Question:

Which of the following is not an aggregate function that can be applied to a DataFrame?

Show Hint

Aggregate functions in pandas typically summarize data, such as calculating the sum, mean, maximum, or standard deviation. Sorting is a different operation and is not considered an aggregation.
Updated On: Apr 24, 2025
  • max()
  • std()
  • var()
  • sort()
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

In pandas, \texttt{max()}, \texttt{std()}, and \texttt{var()} are valid aggregate functions that can be applied to a DataFrame. \texttt{max()} returns the maximum value, \texttt{std()} computes the standard deviation, and \texttt{var()} computes the variance of the columns in the DataFrame. However, \texttt{sort()} is not an aggregate function; it is used to sort data in a DataFrame. Therefore, the correct answer is \texttt{sort()}.
Was this answer helpful?
0
0

Questions Asked in CUET exam

View More Questions