I'm trying to reshape a pandas dataframe to display properties of a single object (column1) that are organized line by line into a single line per object with multiple columns and NaNs in case the properties are missing, like the second table.
I've found the exactly opposite (pd.melt) but so far couldn't reverse the process.
df.pivot(index='Column1', columns='Column3', values='Column2')
– moises Jan 14 '20 at 21:09