Q. Which pandas method reshapes a DataFrame by pivoting the index and columns?
β
Correct Answer: (A)
pivot()
Explanation: The pivot() method reshapes data by turning unique values from a column into new columns.