From 494bdf82bf30b40175d148442b298498834d6027 Mon Sep 17 00:00:00 2001 From: Nikhil Choudhary <49715980+Nikhil1O1@users.noreply.github.com> Date: Wed, 9 Sep 2020 08:38:18 +0530 Subject: [PATCH 1/5] Update groupby.rst The previous description still had a conflict between the column name and index level --- doc/source/user_guide/groupby.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/doc/source/user_guide/groupby.rst b/doc/source/user_guide/groupby.rst index ddba3dc452e28..0b3c9a3ddd7f6 100644 --- a/doc/source/user_guide/groupby.rst +++ b/doc/source/user_guide/groupby.rst @@ -87,11 +87,10 @@ The mapping can be specified many different ways: * A Python function, to be called on each of the axis labels. * A list or NumPy array of the same length as the selected axis. * A dict or ``Series``, providing a ``label -> group name`` mapping. -* For ``DataFrame`` objects, a string indicating a column to be used to group. - Of course ``df.groupby('A')`` is just syntactic sugar for - ``df.groupby(df['A'])``, but it makes life simpler. -* For ``DataFrame`` objects, a string indicating an index level to be used to - group. +* For ``DataFrame`` objects, a string indicating either a column name + or an index level name to be used to group. +* df.groupby('A') is just syntactic sugar for df.groupby(df['A']), + but it feels more pythonic. * A list of any of the above things. Collectively we refer to the grouping objects as the **keys**. For example, From be560acb0c05cd6e5c3abcc0bfacaf85c3aa4161 Mon Sep 17 00:00:00 2001 From: Nikhil Choudhary <49715980+Nikhil1O1@users.noreply.github.com> Date: Wed, 9 Sep 2020 09:20:57 +0530 Subject: [PATCH 2/5] Update groupby.rst attempt to fix trailing white spaces --- doc/source/user_guide/groupby.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/user_guide/groupby.rst b/doc/source/user_guide/groupby.rst index 0b3c9a3ddd7f6..e76d66e323b6b 100644 --- a/doc/source/user_guide/groupby.rst +++ b/doc/source/user_guide/groupby.rst @@ -87,8 +87,8 @@ The mapping can be specified many different ways: * A Python function, to be called on each of the axis labels. * A list or NumPy array of the same length as the selected axis. * A dict or ``Series``, providing a ``label -> group name`` mapping. -* For ``DataFrame`` objects, a string indicating either a column name - or an index level name to be used to group. +* For ``DataFrame`` objects, a string indicating either a column name or +an index level name to be used to group. * df.groupby('A') is just syntactic sugar for df.groupby(df['A']), but it feels more pythonic. * A list of any of the above things. From 4bfd49b4c7aeba8c6f64e5162b9ac32f4bfcc6ec Mon Sep 17 00:00:00 2001 From: Nikhil Choudhary <49715980+Nikhil1O1@users.noreply.github.com> Date: Wed, 9 Sep 2020 17:20:25 +0530 Subject: [PATCH 3/5] Update groupby.rst indentations removed --- doc/source/user_guide/groupby.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/user_guide/groupby.rst b/doc/source/user_guide/groupby.rst index e76d66e323b6b..4bb5273c27870 100644 --- a/doc/source/user_guide/groupby.rst +++ b/doc/source/user_guide/groupby.rst @@ -88,7 +88,7 @@ The mapping can be specified many different ways: * A list or NumPy array of the same length as the selected axis. * A dict or ``Series``, providing a ``label -> group name`` mapping. * For ``DataFrame`` objects, a string indicating either a column name or -an index level name to be used to group. + an index level name to be used to group. * df.groupby('A') is just syntactic sugar for df.groupby(df['A']), but it feels more pythonic. * A list of any of the above things. From 0043d1ed0063a4bdb7652918432452330e52bbf5 Mon Sep 17 00:00:00 2001 From: Nikhil Choudhary <49715980+Nikhil1O1@users.noreply.github.com> Date: Wed, 9 Sep 2020 17:22:04 +0530 Subject: [PATCH 4/5] Update groupby.rst backticks added --- doc/source/user_guide/groupby.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/user_guide/groupby.rst b/doc/source/user_guide/groupby.rst index 4bb5273c27870..1cda18ffa6a82 100644 --- a/doc/source/user_guide/groupby.rst +++ b/doc/source/user_guide/groupby.rst @@ -89,7 +89,7 @@ The mapping can be specified many different ways: * A dict or ``Series``, providing a ``label -> group name`` mapping. * For ``DataFrame`` objects, a string indicating either a column name or an index level name to be used to group. -* df.groupby('A') is just syntactic sugar for df.groupby(df['A']), +* ``df.groupby('A')`` is just syntactic sugar for ``df.groupby(df['A'])``, but it feels more pythonic. * A list of any of the above things. From 320c9ba36706cef333f9ed0f815b6a792f434ac1 Mon Sep 17 00:00:00 2001 From: Nikhil Choudhary <49715980+Nikhil1O1@users.noreply.github.com> Date: Fri, 11 Sep 2020 11:43:42 +0530 Subject: [PATCH 5/5] DOC: Update groupby.rst removed the vague description --- doc/source/user_guide/groupby.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/source/user_guide/groupby.rst b/doc/source/user_guide/groupby.rst index 1cda18ffa6a82..f745dab00bab8 100644 --- a/doc/source/user_guide/groupby.rst +++ b/doc/source/user_guide/groupby.rst @@ -89,8 +89,7 @@ The mapping can be specified many different ways: * A dict or ``Series``, providing a ``label -> group name`` mapping. * For ``DataFrame`` objects, a string indicating either a column name or an index level name to be used to group. -* ``df.groupby('A')`` is just syntactic sugar for ``df.groupby(df['A'])``, - but it feels more pythonic. +* ``df.groupby('A')`` is just syntactic sugar for ``df.groupby(df['A'])``. * A list of any of the above things. Collectively we refer to the grouping objects as the **keys**. For example,