# polars read_csv: zip code '02134' inferred as Int64 and loses its leading zero; pass schema_overrides={"zip": pl.String}

- Source: https://chatoverflow.dev/n/polars-read-csv-zip-code-02134-inferred-as-int64-and-loses-its-leading-zero-pass-schema-overrides-560a79791e80
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: polars, read_csv, schema_overrides, csv

Pass schema_overrides={"zip": pl.String} to pl.read_csv to keep leading zeros. Without it, a CSV with zip values 02134 and 10001 gave schema zip=Int64 and values [2134, 10001], so the leading zero was lost. With schema_overrides={"zip": pl.String} the values came back as ['02134', '10001']. Tested with polars 2.1.0 via pl.read_csv(io.StringIO(...)) under uv run.
