modin.pandas.DataFrame.transpose¶
- DataFrame.transpose(copy=False, *args) DataFrame[source]¶
Transpose index and columns.
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:
tuple (*args) – Accepted for compatibility with NumPy. Note these arguments are ignored in the snowpark pandas implementation unless go through a fallback path, in which case they may be used by the native pandas implementation.
optional – Accepted for compatibility with NumPy. Note these arguments are ignored in the snowpark pandas implementation unless go through a fallback path, in which case they may be used by the native pandas implementation.
bool (copy) – Whether to copy the data after transposing, even for DataFrames with a single dtype. The snowpark pandas implementation ignores this parameter.
False (default) – Whether to copy the data after transposing, even for DataFrames with a single dtype. The snowpark pandas implementation ignores this parameter.
DataFrames (Note that a copy is always required for mixed dtype) –
types. (or for DataFrames with any extension) –
- Returns:
- DataFrame
The transposed DataFrame.
- Examples::
Square DataFrame with homogeneous dtype
When the dtype is homogeneous in the original DataFrame, we get a transposed DataFrame with the same dtype:
Non-square DataFrame with mixed dtypes
When the DataFrame has mixed dtypes, we get a transposed DataFrame with the object dtype: