I have this code and dataframe
df_initial = pd.DataFrame(data = {'ref':['02','NaN','NaN','NaN','03','NaN','NaN','NaN'], 'Part_ID':['1234-1', 'Shop_Work','repair','scrap','4567-2','Shop_Work','clean','overhaul']})
I wish to somehow 'unstack' rows into columns, to give the following output:
I have tried unstack but this is only for multi-index?

