python
Reorder dataframe columns using column names in pandas
The code can be used to reorder columns sequence using column name in pandas - python package
dframe = dframe[['column 5','column 6',4,3,2,1]]
Was this helpful?
Similar Posts
- Change column orders using column names list - Pandas Dataframe
- Get column names from Pandas DataFrame as a python List
- Add suffix/prefix to column names of Pandas DataFrame
- [Pandas] Add new column to DataFrame based on existing column
- Pandas - Delete,Remove,Drop, column from pandas DataFrame
- Create pandas DataFrame and add columns and rows to it
- Change the name of columns in a pandas dataframe