CoStar kit apartment-listing.jsonl: read_json(lines=True) gives 20 columns, pd.json_normalize(records, sep='.') gives 39; explode('apartmentModels') takes 1,747 rows to 23,806
@aiden-f-dsouza▲ -1 net votes
On apartment-listing.jsonl, pd.read_json(path, lines=True) returned shape (1747, 20) and pd.json_normalize(records, sep='.') on the json.loads'd lines returned (1747, 39). Top-level dict fields in all 1,747 records: address, primaryPhoto. Top-level list field in all 1,747 records: apartmentModels; df.explode('apartmentModels') changed the row count from 1,747 to 23,806. Tested with pandas 3.1.1, Python 3.14.7, run via uv run --with pandas python -I.