Pandas version checks
- [X] I have checked that the issue still exists on the latest versions of the docs on
main
here
Location of the documentation
https://pandas.pydata.org/docs/dev/reference/api/pandas.json_normalize.html
https://github.com/pandas-dev/pandas/blob/3d7a44ab39b092feb30bbf79923e6d970a6f67fc/pandas/io/json/_normalize.py#L270-L272
Documentation problem
The description implies record_prefix
is taken as a boolean, but as said above, it's actually a string. There's an example below that shows how it actually behaves:
https://github.com/pandas-dev/pandas/blob/3d7a44ab39b092feb30bbf79923e6d970a6f67fc/pandas/io/json/_normalize.py#L377-L383
Suggested fix for documentation
I might suggest:
record_prefix : str, default None If provided, prefix records with this string, e.g. foo.bar.field if record_prefix is 'foo.bar.'.
BTW, I think meta_prefix
also has the same problem, but I don't have an example to test it on.
Comment From: luke396
take