File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 630630- 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 `)
631631- Bug in :meth: `read_excel ` raising ``ValueError `` when passing array of boolean values when ``dtype="boolean" ``. (:issue: `58159 `)
632632- Bug in :meth: `read_json ` not validating the ``typ `` argument to not be exactly ``"frame" `` or ``"series" `` (:issue: `59124 `)
633+ - Bug in :meth: `read_json ` where extreme value integers in string format were incorrectly parsed as a different integer number (:issue: `20608 `)
633634- Bug in :meth: `read_stata ` raising ``KeyError `` when input file is stored in big-endian format and contains strL data. (:issue: `58638 `)
634635- Bug in :meth: `read_stata ` where extreme value integers were incorrectly interpreted as missing for format versions 111 and prior (:issue: `58130 `)
635636- Bug in :meth: `read_stata ` where the missing code for double was not recognised for format versions 105 and prior (:issue: `58149 `)
Original file line number Diff line number Diff line change @@ -1168,6 +1168,7 @@ def _try_convert_data(
11681168 """
11691169 Try to parse a Series into a column by inferring dtype.
11701170 """
1171+ org_data = data
11711172 # don't try to coerce, unless a force conversion
11721173 if use_dtypes :
11731174 if not self .dtype :
@@ -1222,7 +1223,7 @@ def _try_convert_data(
12221223 if len (data ) and data .dtype in ("float" , "object" ):
12231224 # coerce ints if we can
12241225 try :
1225- new_data = data .astype ("int64" )
1226+ new_data = org_data .astype ("int64" )
12261227 if (new_data == data ).all ():
12271228 data = new_data
12281229 converted = True
Original file line number Diff line number Diff line change @@ -2286,3 +2286,15 @@ def test_read_json_lines_rangeindex():
22862286 result = read_json (StringIO (data ), lines = True ).index
22872287 expected = RangeIndex (2 )
22882288 tm .assert_index_equal (result , expected , exact = True )
2289+
2290+
2291+ def test_large_number ():
2292+ # GH#20608
2293+ result = read_json (
2294+ StringIO ('["9999999999999999"]' ),
2295+ orient = "values" ,
2296+ typ = "series" ,
2297+ convert_dates = False ,
2298+ )
2299+ expected = Series ([9999999999999999 ])
2300+ tm .assert_series_equal (result , expected )
You can’t perform that action at this time.
0 commit comments