I have below Dataframe
I need to reshape the dataframe to below format with product name as a primary key
Dataframe Code:
import pandas as pd
q_df=pd.DataFrame({'Product':['XYZ_1','XYZ_2','XYZ_3'],'Name': \
['Apple','Orange','Guava'],'Cost':[10,8,5],'Availability': \
['Yes','No','Yes']})
I have tried with pivoting the product as index column, but I couldn't able to apply transpose on rest of the dataframe columns.
Please pour your suggestions to get desired outcome