Skip to content

Add regression test for nested meta path in json_normalize #34090

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

Merged
merged 1 commit into from
May 9, 2020

Conversation

LTe
Copy link
Contributor

@LTe LTe commented May 9, 2020

We want to add regression test for #27220 and make sure that this kind of issues will not be present in the future.

Thanks to @yanglinlee code I created test that works with current master branch.

@alimcmaster1 alimcmaster1 added the Testing pandas testing functions or related to the test suite label May 9, 2020

expected = DataFrame(
ex_data,
columns=["name", "population", "state", "shortname", "info.governor"],
Copy link
Member

Choose a reason for hiding this comment

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

Thanks @LTe - is it necessary to pass columns here, given that you already provide them as keys to ex_data?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really, I can delete this.

@LTe LTe force-pushed the json_improve branch from 8bf777d to 45fdb9a Compare May 9, 2020 19:01
@jreback jreback added the IO JSON read_json, to_json, json_normalize label May 9, 2020
@jreback jreback added this to the 1.1 milestone May 9, 2020
@jreback jreback merged commit 9eeb171 into pandas-dev:master May 9, 2020
@jreback
Copy link
Contributor

jreback commented May 9, 2020

thanks @LTe

rhshadrach pushed a commit to rhshadrach/pandas that referenced this pull request May 10, 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 Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

json_normalize does not handle nested meta paths when also using a nested record_path
5 participants