Skip to content

Commit 074b3cb

Browse files
committed
fix: code checks
1 parent 835edf6 commit 074b3cb

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

doc/source/whatsnew/v3.0.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,14 +725,14 @@ I/O
725725
- Bug in :meth:`read_csv` where the order of the ``na_values`` makes an inconsistency when ``na_values`` is a list non-string values. (:issue:`59303`)
726726
- Bug in :meth:`read_excel` raising ``ValueError`` when passing array of boolean values when ``dtype="boolean"``. (:issue:`58159`)
727727
- Bug in :meth:`read_html` where ``rowspan`` in header row causes incorrect conversion to ``DataFrame``. (:issue:`60210`)
728+
- Bug in :meth:`read_json` ignoring the given ``dtype`` when ``engine="pyarrow"`` (:issue:`59516`)
728729
- Bug in :meth:`read_json` not validating the ``typ`` argument to not be exactly ``"frame"`` or ``"series"`` (:issue:`59124`)
729730
- Bug in :meth:`read_json` where extreme value integers in string format were incorrectly parsed as a different integer number (:issue:`20608`)
730731
- Bug in :meth:`read_stata` raising ``KeyError`` when input file is stored in big-endian format and contains strL data. (:issue:`58638`)
731732
- Bug in :meth:`read_stata` where extreme value integers were incorrectly interpreted as missing for format versions 111 and prior (:issue:`58130`)
732733
- Bug in :meth:`read_stata` where the missing code for double was not recognised for format versions 105 and prior (:issue:`58149`)
733734
- Bug in :meth:`set_option` where setting the pandas option ``display.html.use_mathjax`` to ``False`` has no effect (:issue:`59884`)
734735
- Bug in :meth:`to_excel` where :class:`MultiIndex` columns would be merged to a single row when ``merge_cells=False`` is passed (:issue:`60274`)
735-
- Bug in :meth:`read_json` ignoring the given ``dtype`` when ``engine="pyarrow"`` (:issue:`59516`)
736736

737737
Period
738738
^^^^^^

pandas/io/json/_json.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@
3737
from pandas.core.dtypes.dtypes import PeriodDtype
3838

3939
from pandas import (
40+
ArrowDtype,
4041
DataFrame,
4142
Index,
4243
MultiIndex,
4344
Series,
4445
isna,
4546
notna,
4647
to_datetime,
47-
ArrowDtype,
4848
)
4949
from pandas.core.reshape.concat import concat
5050
from pandas.core.shared_docs import _shared_docs
@@ -947,7 +947,7 @@ def read(self) -> DataFrame | Series:
947947
obj = self._read_pyarrow()
948948
elif self.engine == "ujson":
949949
obj = self._read_ujson()
950-
950+
951951
return obj
952952

953953
def _read_pyarrow(self) -> DataFrame:
@@ -967,10 +967,10 @@ def _read_pyarrow(self) -> DataFrame:
967967

968968
schema = pa.schema(fields)
969969
options = pyarrow_json.ParseOptions(explicit_schema=schema)
970-
970+
971971
pa_table = pyarrow_json.read_json(self.data, parse_options=options)
972972
return arrow_table_to_pandas(pa_table, dtype_backend=self.dtype_backend)
973-
973+
974974
def _read_ujson(self) -> DataFrame | Series:
975975
"""
976976
Read JSON using the ujson engine.

pandas/tests/io/json/test_pandas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2183,7 +2183,7 @@ def test_read_json_dtype_backend(
21832183
# string_storage setting -> ignore that for checking the result
21842184
tm.assert_frame_equal(result, expected, check_column_type=False)
21852185

2186-
@td.skip_if_no("pyarrow") # type: ignore
2186+
@td.skip_if_no("pyarrow")
21872187
def test_read_json_pyarrow_with_dtype(self, datapath):
21882188
dtype = {"a": "int32[pyarrow]", "b": "int64[pyarrow]"}
21892189

0 commit comments

Comments
 (0)