pandas and NumPy 3 · Cleaning and transforming
Rename columns
Rename some columns with a mapping.
df = df.rename(columns={"dob": "date_of_birth"})
Official pandas and NumPy 3 documentation
More cleaning and transforming commands
- Count missing values
- Drop rows with missing values
- Fill missing values
- Remove duplicate rows
- Drop columns
- Change a column's type
All cleaning and transforming commands · pandas and NumPy 3 cheatsheet