Skip to content

Conversation

amoitra1
Copy link

@amoitra1 amoitra1 commented Apr 26, 2025

Looking forward to feedback. Thanks!

@amoitra1
Copy link
Author

pre-commit.ci autofix

pandas.read_json
"""
table = ujson_loads(json, precise_float=precise_float)
fields = table["schema"]["fields"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you replace other instances of table["schema"]["fields"] below with fields?

table = ujson_loads(json, precise_float=precise_float)
fields = table["schema"]["fields"]

if any(not isinstance(field["name"], str) for field in fields):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if any(not isinstance(field["name"], str) for field in fields):
if not all(isinstance(field["name"], str) for field in fields):

NIt: IMO this reads a little clearer with me

@mroeschke mroeschke added Error Reporting Incorrect or improved errors from pandas IO JSON read_json, to_json, json_normalize labels Apr 28, 2025
@yuanx749
Copy link
Contributor

yuanx749 commented May 2, 2025

Hi, it seems there is already a PR #60945 addressing this issue.

Copy link
Contributor

github-actions bot commented Jun 2, 2025

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Jun 2, 2025
@mroeschke
Copy link
Member

As mentioned, it appears we already have #60945 addressing this issue so closing in favor of that PR since it was opened first

@mroeschke mroeschke closed this Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Error Reporting Incorrect or improved errors from pandas IO JSON read_json, to_json, json_normalize Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Raise ValueError for read_json and orient='table' With Numeric Column Names

3 participants