S

Shyam Dubey • 3.70K Points
Extraordinary

Q. Which pandas method reshapes a DataFrame by pivoting the index and columns?

  • (A) pivot()
  • (B) pivot_table()
  • (C) melt()
  • (D) stack()
  • Correct Answer - Option(A)
  • Views: 8
  • Filed under category Pandas
  • Hashtags:

Explanation by: Shyam Dubey
The pivot() method reshapes data by turning unique values from a column into new columns.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.