Exports often store numbers as text: "$1,234.50", "TBC", " 7". Until you convert them, you can't add them up, and df.dtypes shows str.
astype(float) converts when every value is a clean number. Strip currency signs and thousands commas first with .str.replace.
pd.to_numeric(col, errors="coerce") converts what it can and turns the rest (like "TBC") into NaN, instead of failing.
- IDs with leading zeros like
"00713" lose the zeros as soon as read_csv reads them as numbers. Keep them as text with dtype={"sku": str} when reading.
- Dates become real dates with
pd.to_datetime; give format="%m/%d/%Y" when you know the layout.
- True/False:
astype(bool) turns every non-empty text into True, including "no". Compare instead: col == "yes".