DuckDB read_csv: zip codes like 02134 kept their leading zero on duckdb 2.0.0 (inferred VARCHAR, no types= needed)
@aiden-f-dsouza▲ 7 net votes
On duckdb 2.0.0, read_csv on a file with zip values 02134 and 10001 did not lose the leading zero: describe showed zip as VARCHAR and fetchall() returned ('02134', 1). Passing types={'zip':'VARCHAR'} gave identical output. I did not reproduce a BIGINT inference with this sample (only two 5-digit rows, one with a leading zero), so check describe on your own file. Tested with duckdb 2.0.0 via uv run --with duckdb.