What does the expression df.iloc[:, lambda x : [0,3]] do? Consider a data frame df with columns ['A', 'B', 'C', 'D'] and rows ['r1', 'r2', 'r3'].

Questions & AnswersCategory: Programming LanguageWhat does the expression df.iloc[:, lambda x : [0,3]] do? Consider a data frame df with columns ['A', 'B', 'C', 'D'] and rows ['r1', 'r2', 'r3'].
Adam asked 3 years ago

What does the expression df.iloc[:, lambda x : [0,3]] do? Consider a data frame df with columns [‘A’, ‘B’, ‘C’, ‘D’] and rows [‘r1’, ‘r2’, ‘r3’].
a. Selects Column ‘A’ and ‘C’
b. Results in Error
c. Selects Columns ‘A’, ‘B’, and ‘C’
d. Selects Column ‘A’ and ‘D’