pandas and NumPy 3 · Cleaning and transforming
Clean text columns
Apply string methods to a whole column.
df["email"] = df["email"].str.strip().str.lower()
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
- Rename columns
- Drop columns
All cleaning and transforming commands · pandas and NumPy 3 cheatsheet