Let say I have below dataframe
import pandas as pd
>>> pd.DataFrame({'product_name': ['laptop', 'printer', 'printer',], 'price': [1200, 150, 1200], 'price1': [1250, 130, 12000]})
product_name price price1
0 laptop 1200 1250
1 printer 150 130
2 printer 1200 12000
Now, I want to unmelt above dataframe, and want to create a new dataframe with just 1 row based on selected original columns as below,
Is there any method/function available with pandas to achieve the same?
Any pointer will be very appreciated.
