pandas and NumPy 3 · Cleaning and transforming

Change a column's type

Convert a column to another type.

df["age"] = df["age"].astype("int64")

Official pandas and NumPy 3 documentation

More cleaning and transforming commands

All cleaning and transforming commands · pandas and NumPy 3 cheatsheet

Was this page helpful?