Skip to content

Commit 31bcc07

Browse files
committed
adjusted docstring and type assignment
1 parent c120ab5 commit 31bcc07

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pandas/io/json/_normalize.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
TYPE_CHECKING,
1212
Any,
1313
DefaultDict,
14+
Union,
1415
overload,
1516
)
1617

@@ -267,7 +268,7 @@ def _simple_json_normalize(
267268

268269

269270
def json_normalize(
270-
data: dict | list[dict] | Series | str | bytes,
271+
data: Union[dict[Any, Any], list[dict[Any, Any]], Series, str, bytes],
271272
record_path: str | list | None = None,
272273
meta: str | list[str | list[str]] | None = None,
273274
meta_prefix: str | None = None,
@@ -285,7 +286,7 @@ def json_normalize(
285286
286287
Parameters
287288
----------
288-
data : dict, list of dicts, Series of dicts/JSON strings/bytes, or JSON string/bytes
289+
data : dict, list of dicts, Series of dicts/JSON str/bytes, or JSON str/bytes
289290
Unserialized JSON objects or JSON strings/bytes.
290291
record_path : str or list of str, default None
291292
Path in each object to list of records. If not passed, data will be
@@ -449,7 +450,7 @@ def json_normalize(
449450
if isinstance(data, Series):
450451
if data.empty:
451452
return DataFrame()
452-
453+
453454
sample = data.iloc[0]
454455
if isinstance(sample, (str, bytes)):
455456
import json

0 commit comments

Comments
 (0)