Why and How to Reshape a Pandas Dataframe from Wide to Long
A Simple Piece of Code Does the Trick
Published in
4 min readFeb 24, 2022
As data scientists, we know that data does not always come to us with the most desirable format that’s ready for analysis or visualization. Reshaping a table or pandas dataframe from wide to long format falls into one of those scenarios where we need to apply some ‘tricks’ to the data to proceed with…