From b7ee7a6c11e31bb065ed0434a7ef2fdae5cd88c2 Mon Sep 17 00:00:00 2001 From: gurukiran07 Date: Sun, 28 Jun 2020 20:12:15 +0530 Subject: [PATCH 01/12] DOC: Updated aggregate docstring --- pandas/core/generic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index a66cade3b81b0..06e9e03c703a1 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -5074,7 +5074,8 @@ def pipe(self, func, *args, **kwargs): {see_also} Notes ----- - `agg` is an alias for `aggregate`. Use the alias. + - `agg` is an alias for `aggregate`. Use the alias. + - Some NumPy functions such as ``np.mean``, ``np.nanmean``, ``np.median`` etc. resolve to their corresponding internal cython function. A passed user-defined-function will be passed a Series for evaluation. {examples}""" From beee950bdf9b8413033be7b977e5d48b43ea38ed Mon Sep 17 00:00:00 2001 From: gurukiran07 Date: Sun, 28 Jun 2020 20:58:31 +0530 Subject: [PATCH 02/12] Doc: updated aggregate docstring --- pandas/core/generic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 06e9e03c703a1..bd5377d347915 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -5075,7 +5075,8 @@ def pipe(self, func, *args, **kwargs): Notes ----- - `agg` is an alias for `aggregate`. Use the alias. - - Some NumPy functions such as ``np.mean``, ``np.nanmean``, ``np.median`` etc. resolve to their corresponding internal cython function. + - Some NumPy functions such as ``np.mean``, ``np.nanmean``, ``np.median`` etc. + resolve to their corresponding internal cython function. A passed user-defined-function will be passed a Series for evaluation. {examples}""" From fff4b7e797bd4d57d7cef2e1821d4c19847b980d Mon Sep 17 00:00:00 2001 From: guru kiran <47276342+gurukiran07@users.noreply.github.com> Date: Mon, 29 Jun 2020 13:48:52 +0530 Subject: [PATCH 03/12] Update pandas/core/generic.py Co-authored-by: Marco Gorelli <33491632+MarcoGorelli@users.noreply.github.com> --- pandas/core/generic.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index bd5377d347915..faf7c81e61bc0 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -5075,8 +5075,9 @@ def pipe(self, func, *args, **kwargs): Notes ----- - `agg` is an alias for `aggregate`. Use the alias. - - Some NumPy functions such as ``np.mean``, ``np.nanmean``, ``np.median`` etc. - resolve to their corresponding internal cython function. + - Some NumPy functions resolve to their corresponding internal Cython function. As pandas operations + generally exclude NaNs, this means that `.agg(np.nanmedian)`, `.agg(np.median)`, and `.agg('median') + will return the same result. A passed user-defined-function will be passed a Series for evaluation. {examples}""" From 26add4a6d1067ba64246d2bac17673bad9fea733 Mon Sep 17 00:00:00 2001 From: guru kiran <47276342+gurukiran07@users.noreply.github.com> Date: Mon, 29 Jun 2020 13:58:21 +0530 Subject: [PATCH 04/12] Update generic.py --- pandas/core/generic.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index faf7c81e61bc0..a3f0bd0fa0939 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -5075,9 +5075,9 @@ def pipe(self, func, *args, **kwargs): Notes ----- - `agg` is an alias for `aggregate`. Use the alias. - - Some NumPy functions resolve to their corresponding internal Cython function. As pandas operations - generally exclude NaNs, this means that `.agg(np.nanmedian)`, `.agg(np.median)`, and `.agg('median') - will return the same result. + - Some NumPy functions resolve to their corresponding internal Cython function. + As pandas operations generally exclude NaNs, for example `.agg(np.nanmedian)`, + `.agg(np.median)`, and `.agg('median') will return the same result. A passed user-defined-function will be passed a Series for evaluation. {examples}""" From 15ecaf724e98c5bcb2d459e720ca60e22e758346 Mon Sep 17 00:00:00 2001 From: guru kiran <47276342+gurukiran07@users.noreply.github.com> Date: Tue, 21 Jul 2020 15:14:35 +0530 Subject: [PATCH 05/12] Update generic.py --- pandas/core/generic.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 41dd3e2941a06..29bfceeb6b83f 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -5075,9 +5075,8 @@ def pipe(self, func, *args, **kwargs): Notes ----- - `agg` is an alias for `aggregate`. Use the alias. - - Some NumPy functions resolve to their corresponding internal Cython function. - As pandas operations generally exclude NaNs, for example `.agg(np.nanmedian)`, - `.agg(np.median)`, and `.agg('median') will return the same result. + - Pandas operations generally exclude NaNs. For example, `agg(np.nanmedian)`, + `agg(np.median)`, and `agg('median') will return the same result. A passed user-defined-function will be passed a Series for evaluation. {examples}""" From cc231c80a7a0bf9a18f3d4342e156d9d95c5ac8b Mon Sep 17 00:00:00 2001 From: gurukiran07 Date: Tue, 21 Jul 2020 16:03:45 +0530 Subject: [PATCH 06/12] Revert "Update generic.py" This reverts commit 15ecaf724e98c5bcb2d459e720ca60e22e758346. --- pandas/core/generic.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 29bfceeb6b83f..41dd3e2941a06 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -5075,8 +5075,9 @@ def pipe(self, func, *args, **kwargs): Notes ----- - `agg` is an alias for `aggregate`. Use the alias. - - Pandas operations generally exclude NaNs. For example, `agg(np.nanmedian)`, - `agg(np.median)`, and `agg('median') will return the same result. + - Some NumPy functions resolve to their corresponding internal Cython function. + As pandas operations generally exclude NaNs, for example `.agg(np.nanmedian)`, + `.agg(np.median)`, and `.agg('median') will return the same result. A passed user-defined-function will be passed a Series for evaluation. {examples}""" From 3a52d994aab9e9aa65000413d32d911afc9cf9e8 Mon Sep 17 00:00:00 2001 From: gurukiran07 Date: Tue, 21 Jul 2020 16:03:57 +0530 Subject: [PATCH 07/12] Revert "Revert "Update generic.py"" This reverts commit cc231c80a7a0bf9a18f3d4342e156d9d95c5ac8b. --- pandas/core/generic.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 41dd3e2941a06..29bfceeb6b83f 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -5075,9 +5075,8 @@ def pipe(self, func, *args, **kwargs): Notes ----- - `agg` is an alias for `aggregate`. Use the alias. - - Some NumPy functions resolve to their corresponding internal Cython function. - As pandas operations generally exclude NaNs, for example `.agg(np.nanmedian)`, - `.agg(np.median)`, and `.agg('median') will return the same result. + - Pandas operations generally exclude NaNs. For example, `agg(np.nanmedian)`, + `agg(np.median)`, and `agg('median') will return the same result. A passed user-defined-function will be passed a Series for evaluation. {examples}""" From f769179a43d0c7f260ce328191779ddfc3af4c1a Mon Sep 17 00:00:00 2001 From: guru kiran <47276342+gurukiran07@users.noreply.github.com> Date: Tue, 21 Jul 2020 16:40:54 +0530 Subject: [PATCH 08/12] Updated docstring of agg --- pandas/core/generic.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 29bfceeb6b83f..64d8a8ff47d09 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -5074,9 +5074,10 @@ def pipe(self, func, *args, **kwargs): {see_also} Notes ----- - - `agg` is an alias for `aggregate`. Use the alias. - - Pandas operations generally exclude NaNs. For example, `agg(np.nanmedian)`, - `agg(np.median)`, and `agg('median') will return the same result. + `agg` is an alias for `aggregate`. Use the alias. + + Pandas operations generally exclude NaNs. For example, `agg(np.nanmedian)`, + `agg(np.median)`, and `agg('median') will return the same result. A passed user-defined-function will be passed a Series for evaluation. {examples}""" From 88137808d26938c6df968951b6a51ae372ba4e9a Mon Sep 17 00:00:00 2001 From: guru kiran <47276342+gurukiran07@users.noreply.github.com> Date: Tue, 21 Jul 2020 17:00:09 +0530 Subject: [PATCH 09/12] Trailing whitespace removed --- 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 64d8a8ff47d09..8e3ea81590510 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -5075,7 +5075,7 @@ def pipe(self, func, *args, **kwargs): Notes ----- `agg` is an alias for `aggregate`. Use the alias. - + Pandas operations generally exclude NaNs. For example, `agg(np.nanmedian)`, `agg(np.median)`, and `agg('median') will return the same result. From 1fc09497e8602ab2685c1ece7548dbc8ae7a0b2d Mon Sep 17 00:00:00 2001 From: guru kiran <47276342+gurukiran07@users.noreply.github.com> Date: Tue, 21 Jul 2020 17:41:51 +0530 Subject: [PATCH 10/12] DOC: Updated docstring of agg --- 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 8e3ea81590510..57dd13a703bfc 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -5077,7 +5077,7 @@ def pipe(self, func, *args, **kwargs): `agg` is an alias for `aggregate`. Use the alias. Pandas operations generally exclude NaNs. For example, `agg(np.nanmedian)`, - `agg(np.median)`, and `agg('median') will return the same result. + `agg(np.median)`, and `agg('median')` will return the same result. A passed user-defined-function will be passed a Series for evaluation. {examples}""" From 0927b61baf0eefff9d123c4f7622af74b098d9be Mon Sep 17 00:00:00 2001 From: guru kiran <47276342+gurukiran07@users.noreply.github.com> Date: Wed, 22 Jul 2020 12:31:17 +0530 Subject: [PATCH 11/12] Update generic.py --- 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 57dd13a703bfc..44ac3b6bdee1b 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -5076,8 +5076,8 @@ def pipe(self, func, *args, **kwargs): ----- `agg` is an alias for `aggregate`. Use the alias. - Pandas operations generally exclude NaNs. For example, `agg(np.nanmedian)`, - `agg(np.median)`, and `agg('median')` will return the same result. + Pandas operations generally exclude NaNs. For example, ``agg(np.nanmedian)``, + ``agg(np.median)``, and ``agg('median')`` will return the same result. A passed user-defined-function will be passed a Series for evaluation. {examples}""" From fcb549685950b6c3db68674212f1159452d40855 Mon Sep 17 00:00:00 2001 From: guru kiran <47276342+gurukiran07@users.noreply.github.com> Date: Sat, 22 Aug 2020 12:08:33 +0530 Subject: [PATCH 12/12] Updated Docstring --- 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 44ac3b6bdee1b..aeec70bc392ff 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -5076,8 +5076,8 @@ def pipe(self, func, *args, **kwargs): ----- `agg` is an alias for `aggregate`. Use the alias. - Pandas operations generally exclude NaNs. For example, ``agg(np.nanmedian)``, - ``agg(np.median)``, and ``agg('median')`` will return the same result. + In pandas, agg, as most operations just ignores the missing values, + and returns the operation only considering the values that are present. A passed user-defined-function will be passed a Series for evaluation. {examples}"""