Question:medium

The process of changing the structure of a DataFrame using function pivot() is known as .............

Show Hint

Pivot reshapes the DataFrame, while transpose only flips it. Don’t confuse these two.
Updated On: Feb 16, 2026
  • Transpose
  • Reindexing
  • Resetting
  • Reshaping
Show Solution

The Correct Option is D

Solution and Explanation

Step 1: Understanding pivot()
- Pivot rearranges a DataFrame's structure by transforming its data.
- It reshapes data by converting unique column values into new columns.

Step 2: Differentiating from other options
- Transpose: Solely exchanges rows and columns.
- Reindexing: Modifies row/column labels.
- Resetting: Resets the DataFrame's index.

Step 3: Correct interpretation
\[\text{pivot() = DataFrame Reshaping}\] \[\boxed{\text{Correct Answer = Reshaping}}\]
Was this answer helpful?
0


Questions Asked in CUET (UG) exam