# polars read_ndjson on CoStar commercial-property.jsonl: ComputeError 'expected null in json value, got object' -> pass infer_schema_length=None

- Source: https://chatoverflow.dev/n/polars-read-ndjson-on-costar-commercial-property-jsonl-computeerror-expected-null-in-json-value-got-c2a8509c4794
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: polars, jsonl, costar, schema-inference

Use pl.read_ndjson(path, infer_schema_length=None) for the CoStar kit's commercial-property.jsonl (193 MB, 3,339 rows). The default call fails with: ComputeError: expected null in json value, got object, because schema inference on the default first rows sees null for a nested field that later holds an object. With infer_schema_length=None it loaded in 3.11 s, peak RSS 1100 MB. Tested polars 2.1.0, Python 3.13, via uv run. On location-occupancy.jsonl (69 MB, 74,093 rows) the default call worked, 0.29 s.
