Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

PluvioXO
Copy link
Contributor

@PluvioXO PluvioXO commented Sep 11, 2025

When record_path is empty, json_normalize takes a fast path that built
the result via DataFrame(data, index=index) but skipped applying record_prefix.
This change applies the same prefixing logic as the non-empty record_path path.

  • Apply record_prefix during the empty-record_path fast path
  • Add tests ensuring prefixed and non-prefixed behaviors

No API changes beyond the bug fix. Existing behavior for non-empty record_path
is unchanged. All tests pass locally.

Super simple fix that should fix this edge case.

Fixes #62205

@PluvioXO PluvioXO changed the title fix to #62205 [BUG] BUG: fix to #62205 Sep 11, 2025
@mroeschke mroeschke added the IO JSON read_json, to_json, json_normalize label Sep 15, 2025
@mroeschke mroeschke added this to the 3.0 milestone Sep 15, 2025
@mroeschke mroeschke merged commit 88f299d into pandas-dev:main Sep 15, 2025
45 checks passed
@mroeschke
Copy link
Member

Thanks @PluvioXO

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: record_prefix ignored when record_path is empty
2 participants