Skip to content

Latest commit

 

History

History
11 lines (7 loc) · 385 Bytes

rename_cols.md

File metadata and controls

11 lines (7 loc) · 385 Bytes

Renaming Cols with Pandas

pandas.DataFrame.rename

df = pd.read_csv('some-dir-to-csv')

df.rename(columns={'<old col name>':'<new col name>'}, inplace=True)

inplace=True - Whether to return a new DataFrame. If True then value of copy is ignored.