-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
BugDtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsIO JSONread_json, to_json, json_normalizeread_json, to_json, json_normalize
Milestone
Description
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()
AttributeError: module 'tables' has no attribute 'version'
Metadata
Metadata
Assignees
Labels
BugDtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsIO JSONread_json, to_json, json_normalizeread_json, to_json, json_normalize