diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 427938c3c5fba..84ee5ba205fa2 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -151,7 +151,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.infer_freq SA01" \ -i "pandas.io.json.build_table_schema PR07,RT03,SA01" \ -i "pandas.io.stata.StataWriter.write_file SA01" \ - -i "pandas.json_normalize RT03,SA01" \ -i "pandas.plotting.andrews_curves RT03,SA01" \ -i "pandas.plotting.scatter_matrix PR07,SA01" \ -i "pandas.set_eng_float_format RT03,SA01" \ diff --git a/pandas/io/json/_normalize.py b/pandas/io/json/_normalize.py index 7d3eefae39679..45c8876dbe3e5 100644 --- a/pandas/io/json/_normalize.py +++ b/pandas/io/json/_normalize.py @@ -279,6 +279,10 @@ def json_normalize( """ Normalize semi-structured JSON data into a flat table. + This method is designed to transform semi-structured JSON data, such as nested + dictionaries or lists, into a flat table. This is particularly useful when + handling JSON-like data structures that contain deeply nested fields. + Parameters ---------- data : dict, list of dicts, or Series of dicts @@ -310,8 +314,13 @@ def json_normalize( Returns ------- - frame : DataFrame - Normalize semi-structured JSON data into a flat table. + DataFrame + The normalized data, represented as a pandas DataFrame. + + See Also + -------- + DataFrame : Two-dimensional, size-mutable, potentially heterogeneous tabular data. + Series : One-dimensional ndarray with axis labels (including time series). Examples --------