python
rename columns
report_old.rename(columns={
_col: _col+'_old' for _col in report_old.columns if _col not in ['item_id', ]
}, inplace=True)
Was this helpful?
Similar Posts
- Reorder dataframe columns using column names in pandas
- Create pandas DataFrame and add columns and rows to it
- Change the name of columns in a pandas dataframe
- Delete one or multiple columns from Pandas Dataframe
- Get the count of rows and columns of a Pandas DataFrame
- Sort a DataFrame by rows and columns in Pandas
- Select specific columns from a Pandas DataFrame