Reflect the DataFrame over its main diagonal by writing rows as columns
and vice-versa. The property T is an accessor to the method
transpose().
Parameters
:
*args : tuple, optional
Accepted for compatibility with NumPy.
copy : bool, default False
Whether to copy the data after transposing, even for DataFrames
with a single dtype.
Note that a copy is always required for mixed dtype DataFrames,
or for DataFrames with any extension types.
Returns:
DataFrame
The transposed DataFrame.
Notes
Transposing a DataFrame with mixed dtypes will result in a homogeneous
DataFrame with the object dtype. In such a case, a copy of the data
is always made.