KnowledgeBoat Logo
|

Informatics Practices

To get the transpose of a dataframe D1, you can write …………… .

  1. D1.T
  2. D1.Transpose
  3. D1.Swap
  4. All of these

Python Pandas

3 Likes

Answer

D1.T

Reason — We can transpose a DataFrame by swapping its indexes and columns using the attribute T, with the syntax DataFrame.T. Therefore, D1.T is used to get the transpose of a DataFrame D1.

Answered By

1 Like


Related Questions