Skip to content

read_json with orient="values" and numpy=True provides strange column #28559

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

Closed
WillAyd opened this issue Sep 21, 2019 · 1 comment
Closed

read_json with orient="values" and numpy=True provides strange column #28559

WillAyd opened this issue Sep 21, 2019 · 1 comment
Labels
IO JSON read_json, to_json, json_normalize

Comments

@WillAyd
Copy link
Member

WillAyd commented Sep 21, 2019

Another edge case revealed in #28510 . Perhaps won't be relvant if we go through with #28512 but opening for posterity

For whatever reason, this particular combination of values produces a RangeIndex for the columns.

>>> pd.read_json("[]", orient="values", numpy=True).columns
RangeIndex(start=0, stop=1, step=1)

Nothing else appears to do that

@WillAyd WillAyd added the IO JSON read_json, to_json, json_normalize label Sep 21, 2019
@WillAyd
Copy link
Member Author

WillAyd commented Jan 9, 2020

numpy argument is deprecated

@WillAyd WillAyd closed this as completed Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO JSON read_json, to_json, json_normalize
Projects
None yet
Development

No branches or pull requests

1 participant