File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -725,14 +725,14 @@ I/O
725
725
- 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 `)
726
726
- Bug in :meth: `read_excel ` raising ``ValueError `` when passing array of boolean values when ``dtype="boolean" ``. (:issue: `58159 `)
727
727
- 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 `)
728
729
- Bug in :meth: `read_json ` not validating the ``typ `` argument to not be exactly ``"frame" `` or ``"series" `` (:issue: `59124 `)
729
730
- Bug in :meth: `read_json ` where extreme value integers in string format were incorrectly parsed as a different integer number (:issue: `20608 `)
730
731
- Bug in :meth: `read_stata ` raising ``KeyError `` when input file is stored in big-endian format and contains strL data. (:issue: `58638 `)
731
732
- Bug in :meth: `read_stata ` where extreme value integers were incorrectly interpreted as missing for format versions 111 and prior (:issue: `58130 `)
732
733
- Bug in :meth: `read_stata ` where the missing code for double was not recognised for format versions 105 and prior (:issue: `58149 `)
733
734
- Bug in :meth: `set_option ` where setting the pandas option ``display.html.use_mathjax `` to ``False `` has no effect (:issue: `59884 `)
734
735
- 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 `)
736
736
737
737
Period
738
738
^^^^^^
Original file line number Diff line number Diff line change 37
37
from pandas .core .dtypes .dtypes import PeriodDtype
38
38
39
39
from pandas import (
40
+ ArrowDtype ,
40
41
DataFrame ,
41
42
Index ,
42
43
MultiIndex ,
43
44
Series ,
44
45
isna ,
45
46
notna ,
46
47
to_datetime ,
47
- ArrowDtype ,
48
48
)
49
49
from pandas .core .reshape .concat import concat
50
50
from pandas .core .shared_docs import _shared_docs
@@ -947,7 +947,7 @@ def read(self) -> DataFrame | Series:
947
947
obj = self ._read_pyarrow ()
948
948
elif self .engine == "ujson" :
949
949
obj = self ._read_ujson ()
950
-
950
+
951
951
return obj
952
952
953
953
def _read_pyarrow (self ) -> DataFrame :
@@ -967,10 +967,10 @@ def _read_pyarrow(self) -> DataFrame:
967
967
968
968
schema = pa .schema (fields )
969
969
options = pyarrow_json .ParseOptions (explicit_schema = schema )
970
-
970
+
971
971
pa_table = pyarrow_json .read_json (self .data , parse_options = options )
972
972
return arrow_table_to_pandas (pa_table , dtype_backend = self .dtype_backend )
973
-
973
+
974
974
def _read_ujson (self ) -> DataFrame | Series :
975
975
"""
976
976
Read JSON using the ujson engine.
Original file line number Diff line number Diff line change @@ -2183,7 +2183,7 @@ def test_read_json_dtype_backend(
2183
2183
# string_storage setting -> ignore that for checking the result
2184
2184
tm .assert_frame_equal (result , expected , check_column_type = False )
2185
2185
2186
- @td .skip_if_no ("pyarrow" ) # type: ignore
2186
+ @td .skip_if_no ("pyarrow" )
2187
2187
def test_read_json_pyarrow_with_dtype (self , datapath ):
2188
2188
dtype = {"a" : "int32[pyarrow]" , "b" : "int64[pyarrow]" }
2189
2189
You can’t perform that action at this time.
0 commit comments