Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Weird column name type conversion in read_json with orient='table' and string columns #25435

Closed
albertvillanova opened this issue Feb 24, 2019 · 0 comments

Comments

@albertvillanova
Copy link
Contributor

commented Feb 24, 2019

Code Sample, a copy-pastable example if possible

expected = pd.DataFrame({'1.': [1, 2]})
result = pd.read_json(expected.to_json(orient='table'), orient='table')
In [7]: expected                                                                                                                               
Out[7]: 
   1.
0   1
1   2

In [8]: result                                                                                                                                 
Out[8]: 
   1970-01-01 00:00:01
0                    1
1                    2

Problem description

There is a weird column type conversion from string to Timestamp.

Expected Output

The result should be equal to expected.

Output of pd.show_versions()

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

albertvillanova pushed a commit to albertvillanova/pandas that referenced this issue Feb 24, 2019

@jschendel jschendel added this to the 0.25.0 milestone Feb 25, 2019

@albertvillanova albertvillanova changed the title BUG: Weird column type conversion in read_json with orient='table' and string columns BUG: Weird column name type conversion in read_json with orient='table' and string columns Feb 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.