BUG: Index type casting in read_json with orient='table' and float index (original) (raw)

Code Sample, a copy-pastable example if possible

expected = pd.DataFrame({'a':[5,5]}, index=[1.,2.]) result = pd.read_json(expected.to_json(orient='table'), orient='table')

In [141]: expected
Out[141]: 
     a
1.0  5
2.0  5

In [142]: result
Out[142]: 
   a
1  5
2  5

Problem description

Round trip should recover the original DataFrame. But the result index has been cast from float to integer.

Expected Output

The same as expected.

Output of pd.show_versions()

Details

AttributeError: module 'tables' has no attribute 'version'