Informatics Practices
To get the transpose of a dataframe D1, you can write …………… .
- D1.T
- D1.Transpose
- D1.Swap
- 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
3 Likes
Related Questions
To get a number representing number of axes in a dataframe, …………… attribute may be used.
- size
- shape
- values
- ndim
Which attribute is not used with DataFrame ?
- Size
- Type
- Empty
- Columns
To extract row/column from a dataframe, ………… function may be used.
- row()
- column()
- loc()
- All of these
To display the 3rd, 4th and 5th columns from the 6th to 9th rows of a dataframe DF, you can write …………… .
- DF.loc[6:9, 3:5]
- DF.loc[6:10, 3:6]
- DF.iloc[6:10, 3:6]
- DF.iloc[6:9, 3:5]