Consider the following operations on a Pandas DataFrame named 'df1'. Which statement(s) is (are) incorrect regarding operations on 'df1'?

A. df1.iloc[0] = [1, 2, 3] assigns the values 1, 2, 3 to the first row of the DataFrame 'df1'.

B. df1['new_col'] = 100 adds a new column named 'new_col' to 'df1' and fills every row in this column with the value 100.

C. df1.drop(columns=['old_col']) will permanently remove the column named 'old_col' from 'df1' without needing further assignment.

D. df1.loc[:,'year'] += 1 increments every value in the column named 'year' by 1.

E. df1.groupby(['category']).sum() will modify 'df1' by aggregating it based on the 'category' column and summing up the numerical values.

Choose the correct answer from the options given below:

1
A, C, and E only
2
B and D only
3
C and E only
4
D only

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation