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

  • (A) pivot()
  • (B) pivot_table()
  • (C) melt()
  • (D) stack()
πŸ’¬ Discuss
βœ… Correct Answer: (B) pivot_table()
Explanation: pivot_table() allows aggregation of values while reshaping the DataFrame, unlike pivot() which requires unique index/columns.
Explanation by: Sikhar Chaudhary
pivot_table() allows aggregation of values while reshaping the DataFrame, unlike pivot() which requires unique index/columns.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
71
Total Visits
πŸ“½οΈ
10 mo ago
Published
πŸŽ–οΈ
Sikhar Chaudhary
Publisher
πŸ“ˆ
96%
Success Rate