Skip to content

Commit 0b477a6

Browse files
committed
Fix pandas-dev#36791 and pandas-dev#34548 correctly respecting read_json chunksize.
1 parent b5233c4 commit 0b477a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/io/json/_json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ def _preprocess_data(self, data):
625625
If self.chunksize, we prepare the data for the `__next__` method.
626626
Otherwise, we read it into memory for the `read` method.
627627
"""
628-
if hasattr(data, "read") and (not self.chunksize or not self.nrows):
628+
if hasattr(data, "read") and not (self.chunksize or self.nrows):
629629
data = data.read()
630630
self.close()
631631
if not hasattr(data, "read") and (self.chunksize or self.nrows):

0 commit comments

Comments
 (0)