Skip to content

BUG: fix json_normalize with meta far different from record_path #59225

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
wants to merge 1 commit into from

Conversation

Opostol
Copy link

@Opostol Opostol commented Jul 11, 2024

  • fix of json_normalize when record_path long and meta path far different from record_path
  • 1 test added and passed

fix of json_normalize when record_path long and meta path far different from record_path
@mroeschke
Copy link
Member

Is there an associate GIthub issue for this PR?

@Opostol
Copy link
Author

Opostol commented Jul 11, 2024

Is there an associate GIthub issue for this PR?

no. Should i create one with minimal reproducible example?

@Opostol
Copy link
Author

Opostol commented Jul 11, 2024

result = pd.json_normalize(data={'meta1':{'meta2':'meta_val'}, 'record1':{'record2':[{'rec1':'rec_val1'},{'rec1':'rec_val2'}]}}, meta=[['meta1','meta2']], record_path=['record1','record2']) falls into exception KeyError: "Key 'meta2' not found.

@mroeschke
Copy link
Member

no. Should i create one with minimal reproducible example?

Yes, it would give more context why this fix is needed

Copy link
Contributor

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 Aug 11, 2024
@mroeschke
Copy link
Member

Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.

@mroeschke mroeschke closed this Aug 12, 2024
@yuanx749 yuanx749 mentioned this pull request Oct 24, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants