← All Python interview questions
Unpivot a wide survey export into tidy rows
MediumPandas — CleaningDeloitteNielsen
The survey tool exports one column per question. Analysis needs tidy long format instead.
Write tidy(df) that melts the q1, q2 and q3 columns into question/score pairs, keeps respondent, drops rows with a missing score, and returns the result sorted by respondent then question with a reset index.
More Pandas — Cleaning questions
Practising alone only goes so far — our live cohorts pair Python and Pandas depth with dashboards, agentic analytics projects and mock interviews.
Explore the program