Skip to content

Conversation

skalwaghe-56
Copy link
Contributor


Coerce meta path elements to str when building meta_keys to avoid sep.join errors and standardize label types.

Add a regression test in TestJSONNormalize verifying integer meta keys with record_path yield string-labeled columns and correct repetition.

Update json_normalize docstring and added an entry to the latest whatsnew/vX.X.X.rst

@skalwaghe-56
Copy link
Contributor Author

@jbrockmendel @rhshadrach Request you to review this!

@skalwaghe-56
Copy link
Contributor Author

@jorisvandenbossche Kindly request you to check and let me know!

@skalwaghe-56 skalwaghe-56 force-pushed the fix-issue-62264 branch 2 times, most recently from 3f6c5a3 to 481efed Compare September 8, 2025 17:04
…(GH#62264)

Coerce meta path elements to str when constructing meta_keys to avoid TypeError during sep.join and align with nested_to_record behavior.

Add regression test in TestJSONNormalize to verify integer meta keys with record_path produce string-labeled columns and correct repetition.

Closes GH#62264.
Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, but I'm negative on coercing ints to strings. It is surprising when this happens.

@skalwaghe-56
Copy link
Contributor Author

@rhshadrach Should I proceed to close the PR then?

@rhshadrach
Copy link
Member

Yes - I think so.

@skalwaghe-56
Copy link
Contributor Author

Closed it! @rhshadrach

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: pd.json_normalize error when non-string keys are used in arguments

2 participants