I wanna transpose columns in conditions like this.
df = pd.DataFrame({"Product" : ["A", "A", "A", "B", "B", "B", "C", "C", "C"],
"Question" : ["What", "When", "Where", "What", "When", "Where", "What", "When", "Where"],
"Answer" : ["Car", "Friday", "German", "Bike", "Wednesday", "France", "Train", "Sunday", "America"]})
Can anyone suggest an effective solution for this case?