Closed
Description
Note that the order of input is not maintained with orient="index"
>>> df = pd.DataFrame(range(3), index=range(3, 0, -1))
>>> df
0
3 0
2 1
1 2
>>> df.to_json(orient="index")
'{"3":{"0":0},"2":{"0":1},"1":{"0":2}}'
>>> pd.read_json(df.to_json(orient="index"), orient="index")
0
1 2
2 1
3 0
This is not necessarily a problem as by definition JSON objects are unordered, but preserving the order here would be a logical follow up to #27309