Given a Pandas DataFrame 'df2', evaluate the accuracy of the following statements:

A. df2[df2['age'] > 25] selects and returns a new DataFrame containing only the rows where the 'age' column has values greater than 25.

B. df2.set_index('id', inplace=True) changes the index of 'df2' to be the values from the 'id' column and does so in place, meaning 'df2' itself is directly modified.

C. df2.sum(axis=1) calculates the sum of each column in 'df2' and returns a Series with these sums.

D. df2['age'].mean() calculates and returns the mean value of the 'age' column in 'df2'.

E. df2.drop('age', axis=1, inplace=False) returns a new DataFrame with the 'age' column removed, leaving 'df2' unchanged.

Select the correct option from below that lists all and only the incorrect statements:

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

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation