From 2f9caae2583e446523d218542eff297ce6da2913 Mon Sep 17 00:00:00 2001 From: Kai Priester Date: Tue, 18 Jan 2022 14:32:49 -0500 Subject: [PATCH 1/4] DOC: Added info on dict of Series with copy=False solution --- pandas/core/frame.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index d08c59338af9e..100d695518ac7 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -490,7 +490,9 @@ class DataFrame(NDFrame, OpsMixin): copy : bool or None, default None Copy data from inputs. For dict data, the default of None behaves like ``copy=True``. For DataFrame - or 2d ndarray input, the default of None behaves like ``copy=False``. + or 2d ndarray input, the default of None behaves like ``copy=False``. + If data is a dict containing a Series, ``copy=False`` will ensure that + BlockManager does not copy from inputs. .. versionchanged:: 1.3.0 From bc4f8ce12c06d0ab2c3cbc90aad8e65ab2405293 Mon Sep 17 00:00:00 2001 From: Kai Priester Date: Tue, 18 Jan 2022 15:07:39 -0500 Subject: [PATCH 2/4] DOC: fixed whitespace issue --- pandas/core/frame.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 100d695518ac7..531c84914f8f4 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -490,9 +490,9 @@ class DataFrame(NDFrame, OpsMixin): copy : bool or None, default None Copy data from inputs. For dict data, the default of None behaves like ``copy=True``. For DataFrame - or 2d ndarray input, the default of None behaves like ``copy=False``. - If data is a dict containing a Series, ``copy=False`` will ensure that - BlockManager does not copy from inputs. + or 2d ndarray input, the default of None behaves like ``copy=False``. + If data is a dict containing a Series, ``copy=False`` will ensure that + BlockManager does not copy from inputs. .. versionchanged:: 1.3.0 From 818bdf53b776454f9d5d33fe3c0c2f1d555ef024 Mon Sep 17 00:00:00 2001 From: Kai Priester Date: Tue, 18 Jan 2022 18:55:02 -0500 Subject: [PATCH 3/4] DOCS: added wording changes from conversation --- pandas/core/frame.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 531c84914f8f4..63fd1005db7c2 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -491,8 +491,8 @@ class DataFrame(NDFrame, OpsMixin): Copy data from inputs. For dict data, the default of None behaves like ``copy=True``. For DataFrame or 2d ndarray input, the default of None behaves like ``copy=False``. - If data is a dict containing a Series, ``copy=False`` will ensure that - BlockManager does not copy from inputs. + If data is a dict containing one or more Series (possibly of different dtypes), + ``copy=False`` will ensure that it does not copy these inputs. .. versionchanged:: 1.3.0 From cde9c25168151d3f2cdf95547521ef5bc8a0c5f3 Mon Sep 17 00:00:00 2001 From: Kai Priester Date: Tue, 18 Jan 2022 18:59:13 -0500 Subject: [PATCH 4/4] DOC: changing to better wording again --- pandas/core/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 63fd1005db7c2..1075111996848 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -492,7 +492,7 @@ class DataFrame(NDFrame, OpsMixin): For dict data, the default of None behaves like ``copy=True``. For DataFrame or 2d ndarray input, the default of None behaves like ``copy=False``. If data is a dict containing one or more Series (possibly of different dtypes), - ``copy=False`` will ensure that it does not copy these inputs. + ``copy=False`` will ensure that these inputs are not copied. .. versionchanged:: 1.3.0