I have a dataframe like below
A B
Customer_1 1000
Customer_1 2000
Customer_1 3000
Customer_2 2000
Customer_2 3000
Customer_3 1000
Customer_3 3000
I want to transform the above dataframe like below , how can i make it ?
A B 3000 2000 1000
Customer_1 1000 0 0 1
Customer_1 2000 0 1 1
Customer_1 3000 1 1 1
Customer_2 2000 0 1 0
Customer_2 3000 1 1 0
Customer_3 1000 0 0 1
Customer_3 3000 1 0 1
I cant figure out how to do this,please help me on this and let me know if you need clarification.