Explain the difference between pivot() and pivot_table() in pandas
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Asks you to compare pandas pivot() and pivot_table() for reshaping long data into a wide table, and to say when each one fits. Tests whether you understand how duplicate index and column pairs, aggregation functions and missing cells change the result.