By Michael Nocito, data analyst · Published August 8, 2026
By the end of this page you can load a CSV into pandas, find out in twenty seconds what type every column became, stop the identifier columns losing their leading zeros, get dates read the way they were written, and turn a money column that arrived as text into numbers. It is about twenty-five minutes, and every output below was produced by running the code.
Here is what to do today, the moment after you first load a file. Run df.dtypes. Not df.head(), which shows you what the values look like, but dtypes, which shows you what they are. A column of identifiers that says int64 has already lost its leading zeros, and a money column that says object or str is text that will refuse to add up.
The short version: read_csv reads characters and guesses a type per column. The guess is usually right, it is silent when it is wrong, and four arguments replace guessing with instruction.
The same characters becoming two different values is the idea, so it gets the picture.






