From 8c3ae796ddaa856b67e96c8b0258e5ecad6d6ec7 Mon Sep 17 00:00:00 2001 From: Ambuj Pawar Date: Sat, 27 Aug 2022 16:43:05 +0530 Subject: [PATCH 1/4] Add none as a default argument for orient --- pandas/io/json/_json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/io/json/_json.py b/pandas/io/json/_json.py index 02a0b27f82ef8..de8b48567f6a0 100644 --- a/pandas/io/json/_json.py +++ b/pandas/io/json/_json.py @@ -501,7 +501,7 @@ def read_json( By file-like object, we refer to objects with a ``read()`` method, such as a file handle (e.g. via builtin ``open`` function) or ``StringIO``. - orient : str + orient : str, default None Indication of expected JSON string format. Compatible JSON strings can be produced by ``to_json()`` with a corresponding orient value. From 4bcc1b2f7d5f831f2296cc50a669f839e99e85f6 Mon Sep 17 00:00:00 2001 From: Ambuj Pawar Date: Mon, 29 Aug 2022 15:15:22 +0530 Subject: [PATCH 2/4] add none to the list of options for orient --- pandas/io/json/_json.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandas/io/json/_json.py b/pandas/io/json/_json.py index de8b48567f6a0..7bc9964e943ae 100644 --- a/pandas/io/json/_json.py +++ b/pandas/io/json/_json.py @@ -514,6 +514,7 @@ def read_json( - ``'index'`` : dict like ``{{index -> {{column -> value}}}}`` - ``'columns'`` : dict like ``{{column -> {{index -> value}}}}`` - ``'values'`` : just the values array + - None : the orient will then be assigned based on `typ` parameter The allowed and default values depend on the value of the `typ` parameter. From 616acbbbb4d27d95db3df854979528e8ffe249e1 Mon Sep 17 00:00:00 2001 From: Ambuj Pawar Date: Mon, 29 Aug 2022 15:18:03 +0530 Subject: [PATCH 3/4] Remove redundant 'the' --- pandas/io/json/_json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/io/json/_json.py b/pandas/io/json/_json.py index 7bc9964e943ae..b75e57596269f 100644 --- a/pandas/io/json/_json.py +++ b/pandas/io/json/_json.py @@ -514,7 +514,7 @@ def read_json( - ``'index'`` : dict like ``{{index -> {{column -> value}}}}`` - ``'columns'`` : dict like ``{{column -> {{index -> value}}}}`` - ``'values'`` : just the values array - - None : the orient will then be assigned based on `typ` parameter + - None : orient will then be assigned based on `typ` parameter The allowed and default values depend on the value of the `typ` parameter. From 8c1ba4d9a7e8cd3423dddf697c0e61b6ed6b67db Mon Sep 17 00:00:00 2001 From: Ambuj Pawar Date: Sat, 3 Sep 2022 09:48:18 +0530 Subject: [PATCH 4/4] Add optional in docstring --- pandas/io/json/_json.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandas/io/json/_json.py b/pandas/io/json/_json.py index b75e57596269f..7614413692b03 100644 --- a/pandas/io/json/_json.py +++ b/pandas/io/json/_json.py @@ -501,7 +501,7 @@ def read_json( By file-like object, we refer to objects with a ``read()`` method, such as a file handle (e.g. via builtin ``open`` function) or ``StringIO``. - orient : str, default None + orient : str, optional Indication of expected JSON string format. Compatible JSON strings can be produced by ``to_json()`` with a corresponding orient value. @@ -514,7 +514,6 @@ def read_json( - ``'index'`` : dict like ``{{index -> {{column -> value}}}}`` - ``'columns'`` : dict like ``{{column -> {{index -> value}}}}`` - ``'values'`` : just the values array - - None : orient will then be assigned based on `typ` parameter The allowed and default values depend on the value of the `typ` parameter.