Skip to content

Commit 28fa332

Browse files
committed
fix: commit checks
1 parent c3f9e7f commit 28fa332

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pandas/io/json/_json.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -959,11 +959,11 @@ def _read_pyarrow(self) -> DataFrame:
959959

960960
if isinstance(self.dtype, dict):
961961
pa = import_optional_dependency("pyarrow")
962-
fields = [
963-
(field, pandas_dtype(dtype).pyarrow_dtype)
964-
for field, dtype in self.dtype.items()
965-
if isinstance(pandas_dtype(dtype), ArrowDtype)
966-
]
962+
fields = []
963+
for field, dtype in self.dtype.items():
964+
pd_dtype = pandas_dtype(dtype)
965+
if isinstance(pd_dtype, ArrowDtype):
966+
fields.append((field, pd_dtype.pyarrow_dtype))
967967

968968
schema = pa.schema(fields)
969969
options = pyarrow_json.ParseOptions(explicit_schema=schema)

0 commit comments

Comments
 (0)