From f424e3957b2e0cb0b0bb261f5a9ca79555eef43d Mon Sep 17 00:00:00 2001 From: Marian Denes Date: Sat, 8 Aug 2020 12:12:07 +0200 Subject: [PATCH 1/5] DOC: Fixed docstring for mode() --- pandas/core/series.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/series.py b/pandas/core/series.py index 9e70120f67969..8f23196eb49aa 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1786,7 +1786,7 @@ def count(self, level=None): def mode(self, dropna=True) -> "Series": """ - Return the mode(s) of the dataset. + Return the mode(s) of the series. Always returns Series even if only one value is returned. From 5eb9637fa851881e45c4e8ae59e01537e16a7508 Mon Sep 17 00:00:00 2001 From: Marian Denes Date: Sun, 9 Aug 2020 13:19:40 +0200 Subject: [PATCH 2/5] DOC: Changed docstring for mode() - Explanation of mode() function --- pandas/core/series.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandas/core/series.py b/pandas/core/series.py index 8f23196eb49aa..3aa27a4591ab4 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1788,6 +1788,9 @@ def mode(self, dropna=True) -> "Series": """ Return the mode(s) of the series. + The mode is the value that appears most often. + It can be multiple values. + Always returns Series even if only one value is returned. Parameters From c1678579acf423af1a01a2e5935eb24356cf2212 Mon Sep 17 00:00:00 2001 From: Marian Denes Date: Sun, 9 Aug 2020 13:23:45 +0200 Subject: [PATCH 3/5] Update pandas/core/series.py Co-authored-by: Marco Gorelli --- pandas/core/series.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/series.py b/pandas/core/series.py index 3aa27a4591ab4..c9636010794b5 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1786,7 +1786,7 @@ def count(self, level=None): def mode(self, dropna=True) -> "Series": """ - Return the mode(s) of the series. + Return the mode(s) of the Series. The mode is the value that appears most often. It can be multiple values. From 0f3e9a427f8da1758fec42a32a37594ee0079ae9 Mon Sep 17 00:00:00 2001 From: Marian Denes Date: Sat, 22 Aug 2020 15:42:26 +0200 Subject: [PATCH 4/5] DOC: Changes in docstring for mode() - Fixed 1st line of docstring - Added explanation for mode() function - Explanation for mode(): joined 2 lines into 1 --- pandas/core/series.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandas/core/series.py b/pandas/core/series.py index c9636010794b5..826f47d529b58 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1788,8 +1788,7 @@ def mode(self, dropna=True) -> "Series": """ Return the mode(s) of the Series. - The mode is the value that appears most often. - It can be multiple values. + The mode is the value that appears most often. It can be multiple values. Always returns Series even if only one value is returned. From e932f12177cbd2f2af56cf12a7a393d68a5b2d5f Mon Sep 17 00:00:00 2001 From: Marian Denes Date: Sat, 22 Aug 2020 17:22:56 +0200 Subject: [PATCH 5/5] Update pandas/core/series.py Co-authored-by: Daniel Saxton <2658661+dsaxton@users.noreply.github.com> --- pandas/core/series.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/series.py b/pandas/core/series.py index 826f47d529b58..b571502f52127 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1788,7 +1788,7 @@ def mode(self, dropna=True) -> "Series": """ Return the mode(s) of the Series. - The mode is the value that appears most often. It can be multiple values. + The mode is the value that appears most often. There can be multiple modes. Always returns Series even if only one value is returned.