pandas.json_normalize
pandas 3.1.1 · Input and output · function
Flatten nested JSON-like records into columns. Set record_path to choose a nested list of records.
Call syntax
pd.json_normalize(…) Full signature
pd.json_normalize(
data,
record_path=None,
meta=None,
meta_prefix=None,
record_prefix=None,
errors='raise',
sep='.',
max_level=None,
)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
data |
Required Positional or keyword |
dict, list of dicts, or Series of dicts Provide the input data read, transformed, or stored by this call. |
record_path |
Optional Positional or keyword Default None |
str or list of str |
meta |
Optional Positional or keyword Default None |
list of paths (str or list of str) |
meta_prefix |
Optional Positional or keyword Default None |
str |
record_prefix |
Optional Positional or keyword Default None |
str |
errors |
Optional Positional or keyword Default 'raise' |
{'raise', 'ignore'} Choose how to handle invalid input or failed operations. The available options depend on the API. |
sep |
Optional Positional or keyword Default '.' |
str Specify the separator between fields or string pieces. |
max_level |
Optional Positional or keyword Default None |
int |
Returns
DataFrame