From f3cc1e0b7c4f0affcf45a3cfca9e7c19c1ea5a64 Mon Sep 17 00:00:00 2001 From: Tan Nian Wei Date: Sat, 10 Oct 2020 16:31:41 +0800 Subject: [PATCH 1/4] DOC: Clarified pandas_version in to_json --- pandas/core/generic.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 338b45b5503dc..30d9d60e24982 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -2207,6 +2207,10 @@ def to_json( Describing the data, where data component is like ``orient='records'``. + Note that ``orient='table'`` contains a 'pandas_version' field under + 'schema'. This denotes the version of `pandas` where the schema was last + revised. + date_format : {None, 'epoch', 'iso'} Type of date conversion. 'epoch' = epoch milliseconds, 'iso' = ISO8601. The default depends on the `orient`. For From e831b0e2a792d04ab3370820d28717417f29ba4a Mon Sep 17 00:00:00 2001 From: Tan Nian Wei Date: Sat, 10 Oct 2020 16:41:49 +0800 Subject: [PATCH 2/4] DOC: Fixed PEP8 issues in prev commit --- pandas/core/generic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 30d9d60e24982..caa7284af2fbe 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -2207,7 +2207,7 @@ def to_json( Describing the data, where data component is like ``orient='records'``. - Note that ``orient='table'`` contains a 'pandas_version' field under + Note that ``orient='table'`` contains a 'pandas_version' field under 'schema'. This denotes the version of `pandas` where the schema was last revised. From 09a3789ada619e40282d2703be44b8436e3745f4 Mon Sep 17 00:00:00 2001 From: Tan Nian Wei Date: Sun, 11 Oct 2020 00:52:01 +0800 Subject: [PATCH 3/4] DOC: updated wording from prev commit --- pandas/core/generic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index caa7284af2fbe..02bfdcfb39414 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -2208,8 +2208,8 @@ def to_json( Describing the data, where data component is like ``orient='records'``. Note that ``orient='table'`` contains a 'pandas_version' field under - 'schema'. This denotes the version of `pandas` where the schema was last - revised. + 'schema'. This stores the version of `pandas` used in the latest + revision of the schema. date_format : {None, 'epoch', 'iso'} Type of date conversion. 'epoch' = epoch milliseconds, From a7f379fb00e38f5eee3b365b91dfe91a2c47a673 Mon Sep 17 00:00:00 2001 From: Tan Nian Wei Date: Mon, 12 Oct 2020 23:07:33 +0800 Subject: [PATCH 4/4] DOC: moved pandas_version clarification in to_json to Notes section --- pandas/core/generic.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 02bfdcfb39414..0290f74eb41df 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -2207,10 +2207,6 @@ def to_json( Describing the data, where data component is like ``orient='records'``. - Note that ``orient='table'`` contains a 'pandas_version' field under - 'schema'. This stores the version of `pandas` used in the latest - revision of the schema. - date_format : {None, 'epoch', 'iso'} Type of date conversion. 'epoch' = epoch milliseconds, 'iso' = ISO8601. The default depends on the `orient`. For @@ -2278,6 +2274,10 @@ def to_json( and the default ``indent=None`` are equivalent in pandas, though this may change in a future release. + ``orient='table'`` contains a 'pandas_version' field under 'schema'. + This stores the version of `pandas` used in the latest revision of the + schema. + Examples -------- >>> import json