-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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: read_json returning Index instead of RangeIndex #57439
Conversation
data = data.astype("float64") | ||
except (TypeError, ValueError): | ||
pass | ||
if data.dtype.kind == "f" and data.dtype != "float64": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know where float32 values are coming from in the first place? I am surprised this is necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same...I'm guessing this is just an overly safe check but just leaving this unchanged since this is a regression fix
…stead of RangeIndex) (#57552) Backport PR #57439: BUG: read_json returning Index instead of RangeIndex Co-authored-by: Matthew Roeschke <[email protected]>
* BUG: read_json returning Index instead of RangeIndex * Keep track of conversion
Index
instead ofRangeIndex
in 2.2 #57429 (Replace xxxx with the GitHub issue number)_convert_axes
and_try_convert_data
could both probably use a cleanup to align with pandas standard inference, but this is a minimal change for 2.2.1