Reshaping a Pandas Dataframe: Long-to-Wide and Vice Versa
Pivot/Unpivot Pandas Dataframes with These Two Simple Methods
Published in
4 min readMay 25, 2022
Reshaping a pandas
dataframe is one of the most common data wrangling tasks in the data analysis world. It is also referred to as transposing or pivoting/unpivoting a table from long to wide or from wide to long format. So what is a long data format vs. a wide data…