What do pandas stack() and unstack() do with a MultiIndex?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Asks what the pandas stack() and unstack() methods do to a DataFrame or Series with a MultiIndex. Tests whether you can predict which level moves, the shape and type of the result, and how missing combinations are handled when reshaping between wide and long formats.