S

Shyam Dubey • 3.70K Points
Extraordinary

Q. Which pandas function is used to pivot a table with aggregation?

  • (A) pivot()
  • (B) pivot_table()
  • (C) melt()
  • (D) stack()
  • Correct Answer - Option(B)
  • Views: 1
  • Filed under category Pandas
  • Hashtags:

Explanation by: Shyam Dubey
pivot_table() allows aggregation of values while reshaping the DataFrame, unlike pivot() which requires unique index/columns.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.