You can use df = df.T
to transpose the dataframe. This switches the dataframe round so that the rows become columns.
You could also use pd.DataFrame.transpose()
.
More Related Contents:
- How to pivot a dataframe in Pandas? [duplicate]
- Convert column to row in Python Pandas
- Transpose the data in a column every nth rows in PANDAS
- How to drop rows of Pandas DataFrame whose value in a certain column is NaN
- Error: pandas hashtable keyerror
- Writing a pandas DataFrame to CSV file
- pandas: How do I split text in a column into multiple rows?
- Find row where values for column is maximal in a pandas DataFrame
- Convert the string 2.90K to 2900 or 5.2M to 5200000 in pandas dataframe
- How to filter rows containing a string pattern from a Pandas dataframe [duplicate]
- Conditionally fill column values based on another columns value in pandas
- Drop rows containing empty cells from a pandas DataFrame
- How to form tuple column from two columns in Pandas
- Remove duplicate rows from Pandas dataframe where only some columns have the same value
- Normalize columns of a dataframe
- Convert pandas Series to DataFrame
- Pandas selecting by label sometimes return Series, sometimes returns DataFrame
- How to replace negative numbers in Pandas Data Frame by zero
- Removing the timestamp from a datetime in pandas dataframe
- pandas comparison raises TypeError: cannot compare a dtyped [float64] array with a scalar of type [bool]
- How do I filter a pandas DataFrame based on value counts?
- Lambda including if…elif…else
- How can I replicate rows of a Pandas DataFrame?
- Pandas DataFrame sort by categorical column but by specific class ordering
- In Python pandas, start row index from 1 instead of zero without creating additional column
- Remove NaN values from pandas dataframe and reshape table [duplicate]
- Python: How to drop a row whose particular column is empty/NaN?
- Combine Pandas data frame column values into new column
- DataFrame object has no attribute append
- Python Pandas : pandas.to_datetime() is switching day & month when day is less than 13