Column Types: dtypes and astype

Every pandas column has one dtype that decides what its values can do, dtypes lists them (int64, float64, str, bool, datetime64, category), astype changes a column's type, and astype stops on text such as '59 lbs' because it can't guess which part is the number.

By

Updated

Cheat sheet: Column Types: dtypes and astype
Category
Data Analysis
Level
Apprentice
Tags
astype(), Data Type (python), dtype, python