CBSE Class 12 Informatics Practices Question 32 of 101

Python Pandas — II — Question 8

Back to all questions
8
Question

Question 8

Which of the following is not a valid function that can be used with DataFrames ?

  1. count()
  2. sum()
  3. length()
  4. mad()
Answer

length()

Reason — In Pandas, the length() function is not a valid function for DataFrames. Instead, we can use the len() function to get the length of a DataFrame. The other functions listed (count(), sum(), mad()) are valid functions for performing operations on DataFrames.