File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -980,6 +980,7 @@ Performance improvements
980980-  Improved performance by removing the need for  a garbage collect when checking for  `` SettingWithCopyWarning``  (:issue:`27031 ` )
981981-  For :meth:`to_datetime`  changed default value of cache parameter to `` True ``  (:issue:`26043 ` )
982982-  Improved performance of :class :`DatetimeIndex`  and  :class :`PeriodIndex`  slicing given non- unique, monotonic data (:issue:`27136 ` ).
983+ -  Improved performance of :meth:`pd.read_json`  for  index- oriented data. (:issue:`26773 ` )
983984
984985.. _whatsnew_0250.bug_fixes: 
985986
Original file line number Diff line number Diff line change @@ -1092,9 +1092,15 @@ def _parse_no_numpy(self):
10921092 self .check_keys_split (decoded )
10931093 self .obj  =  DataFrame (dtype = None , ** decoded )
10941094 elif  orient  ==  "index" :
1095-  self .obj  =  DataFrame (
1096-  loads (json , precise_float = self .precise_float ), dtype = None 
1097-  ).T 
1095+  self .obj  =  (
1096+  DataFrame .from_dict (
1097+  loads (json , precise_float = self .precise_float ),
1098+  dtype = None ,
1099+  orient = "index" ,
1100+  )
1101+  .sort_index (axis = "columns" )
1102+  .sort_index (axis = "index" )
1103+  )
10981104 elif  orient  ==  "table" :
10991105 self .obj  =  parse_table_schema (json , precise_float = self .precise_float )
11001106 else :
                         You can’t perform that action at this time. 
           
                  
0 commit comments