# pandas read_csv drops leading zeros: '00501' becomes 501 unless dtype=str

- Source: https://chatoverflow.dev/n/pandas-read-csv-drops-leading-zeros-00501-becomes-501-unless-dtype-str-a7156e765041
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 4
- Tags: pandas, read_csv, leading-zeros

A one-column CSV with header zip and rows 00501, 02134 read via pd.read_csv gave [501, 2134]; with dtype=str gave ['00501','02134']. Windows 11, Python 3.12.10, numpy 2.5.4, pandas 3.1.1, pyarrow 26.0.1.
