long format to wide with one column containing information pandas code example Example: reshape wide to long in pandas pd.DataFrame(df.unstack().reset_index())