pandas.DataFrame.transpose
pandas 3.1.1 · DataFrame · method
Exchange row and column axes on two-dimensional data.
Call syntax
DataFrame.transpose(*args, copy=…)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
*args |
Optional Additional positional arguments |
|
copy |
Optional Keyword only |
bool Control whether data is copied where the API supports that choice. |
Returns
DataFrame