From fe1bf420d121deb04417ec9d6ddd7b31d966b3e2 Mon Sep 17 00:00:00 2001 From: Natalia Mokeeva Date: Tue, 7 Mar 2023 22:11:51 +0100 Subject: [PATCH 1/5] DOC: sort has no effect on filters --- pandas/core/shared_docs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandas/core/shared_docs.py b/pandas/core/shared_docs.py index 184b77c880238..27a270b5b6147 100644 --- a/pandas/core/shared_docs.py +++ b/pandas/core/shared_docs.py @@ -119,6 +119,8 @@ Sort group keys. Get better performance by turning this off. Note this does not influence the order of observations within each group. Groupby preserves the order of rows within each group. + This argument has no effect on some aggregating functions, such as + :ref:`head, tail ` and ``nth[:]``. .. versionchanged:: 2.0.0 From c77d050d430bccef9c3a3ae8612cdab9d9a18d67 Mon Sep 17 00:00:00 2001 From: Natalia Mokeeva Date: Wed, 8 Mar 2023 12:36:53 +0100 Subject: [PATCH 2/5] DOC: update docs ref --- pandas/core/shared_docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/shared_docs.py b/pandas/core/shared_docs.py index 27a270b5b6147..a55565aa5a1e5 100644 --- a/pandas/core/shared_docs.py +++ b/pandas/core/shared_docs.py @@ -120,7 +120,7 @@ Note this does not influence the order of observations within each group. Groupby preserves the order of rows within each group. This argument has no effect on some aggregating functions, such as - :ref:`head, tail ` and ``nth[:]``. + :ref:`head, tail ` and ``nth[:]``. .. versionchanged:: 2.0.0 From c1cfc4abc3866b46164222589461c99a407f1695 Mon Sep 17 00:00:00 2001 From: Natalia Mokeeva Date: Thu, 9 Mar 2023 14:22:57 +0100 Subject: [PATCH 3/5] DOC: as_index has no effect on filters --- pandas/core/shared_docs.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pandas/core/shared_docs.py b/pandas/core/shared_docs.py index a55565aa5a1e5..87b272ea30ebd 100644 --- a/pandas/core/shared_docs.py +++ b/pandas/core/shared_docs.py @@ -114,13 +114,17 @@ as_index : bool, default True For aggregated output, return object with group labels as the index. Only relevant for DataFrame input. as_index=False is - effectively "SQL-style" grouped output. + effectively "SQL-style" grouped output. This argument has no effect on filtrations + (see the `groupby user guide + `_), + such as ``head()``, ``tail()`` and ``nth()``. sort : bool, default True Sort group keys. Get better performance by turning this off. Note this does not influence the order of observations within each group. Groupby preserves the order of rows within each group. - This argument has no effect on some aggregating functions, such as - :ref:`head, tail ` and ``nth[:]``. + This argument has no effect on filtrations (see the `groupby user guide + `_), + such as ``head()``, ``tail()`` and ``nth()``. .. versionchanged:: 2.0.0 From 63dd4d67e6e5acb495e42335ed235d88b27e4ae4 Mon Sep 17 00:00:00 2001 From: Natalia Mokeeva Date: Thu, 9 Mar 2023 21:24:05 +0100 Subject: [PATCH 4/5] DOC: change duplicate target name --- pandas/core/shared_docs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/shared_docs.py b/pandas/core/shared_docs.py index aebafec69508f..6247025fb4c7c 100644 --- a/pandas/core/shared_docs.py +++ b/pandas/core/shared_docs.py @@ -115,14 +115,14 @@ For aggregated output, return object with group labels as the index. Only relevant for DataFrame input. as_index=False is effectively "SQL-style" grouped output. This argument has no effect - on filtrations (see the `groupby user guide + on filtrations (see the `filtration user guide `_), such as ``head()``, ``tail()`` and ``nth()``. sort : bool, default True Sort group keys. Get better performance by turning this off. Note this does not influence the order of observations within each group. Groupby preserves the order of rows within each group. - This argument has no effect on filtrations (see the `groupby user guide + This argument has no effect on filtrations (see the `filtration user guide `_), such as ``head()``, ``tail()`` and ``nth()``. From f6b2d68564da95c591d9495bc1647a9e4977a28d Mon Sep 17 00:00:00 2001 From: Natalia Mokeeva Date: Thu, 9 Mar 2023 23:29:45 +0100 Subject: [PATCH 5/5] DOC: sort and as_index have no effect in transformations --- pandas/core/shared_docs.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pandas/core/shared_docs.py b/pandas/core/shared_docs.py index 6247025fb4c7c..f3917f539ae3f 100644 --- a/pandas/core/shared_docs.py +++ b/pandas/core/shared_docs.py @@ -112,19 +112,23 @@ If the axis is a MultiIndex (hierarchical), group by a particular level or levels. Do not specify both ``by`` and ``level``. as_index : bool, default True - For aggregated output, return object with group labels as the + Return object with group labels as the index. Only relevant for DataFrame input. as_index=False is effectively "SQL-style" grouped output. This argument has no effect - on filtrations (see the `filtration user guide + on filtrations (see the `filtrations in the user guide `_), - such as ``head()``, ``tail()`` and ``nth()``. + such as ``head()``, ``tail()``, ``nth()`` and in transformations + (see the `transformations in the user guide + `_). sort : bool, default True Sort group keys. Get better performance by turning this off. Note this does not influence the order of observations within each group. Groupby preserves the order of rows within each group. - This argument has no effect on filtrations (see the `filtration user guide + This argument has no effect on filtrations (see the `filtrations in the user guide `_), - such as ``head()``, ``tail()`` and ``nth()``. + such as ``head()``, ``tail()``, ``nth()`` and in transformations + (see the `transformations in the user guide + `_). .. versionchanged:: 2.0.0