This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.2 by this push:
     new 3768734  [MINOR][DOCS][PYTHON] Fix docstring of SeriesGroupBy.nsmallest
3768734 is described below

commit 37687349762bde5e47dcdca4f2d970ad5f20212a
Author: zero323 <[email protected]>
AuthorDate: Wed Dec 22 09:31:00 2021 +0900

    [MINOR][DOCS][PYTHON] Fix docstring of SeriesGroupBy.nsmallest
    
    ### What changes were proposed in this pull request?
    
    Changes `SeriesGroupBy.nsmallest` docstring to match behavior.
    
    ### Why are the changes needed?
    
    The current description mentions columns, which are not applicable to 
`Series` objects and are not argument for this variant.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Existing linter.
    
    Closes #34975 from zero323/SERIES-GROUP-BY-NSMALLEST-DOC.
    
    Authored-by: zero323 <[email protected]>
    Signed-off-by: Hyukjin Kwon <[email protected]>
    (cherry picked from commit 6278c367f219296ab658b0c3baefbebdff73f420)
    Signed-off-by: Hyukjin Kwon <[email protected]>
---
 python/pyspark/pandas/groupby.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/python/pyspark/pandas/groupby.py b/python/pyspark/pandas/groupby.py
index 2d27b129..260bc2a 100644
--- a/python/pyspark/pandas/groupby.py
+++ b/python/pyspark/pandas/groupby.py
@@ -2984,10 +2984,7 @@ class SeriesGroupBy(GroupBy[Series]):
     # TODO: add keep parameter
     def nsmallest(self, n: int = 5) -> Series:
         """
-        Return the first n rows ordered by columns in ascending order in group.
-
-        Return the first n rows with the smallest values in columns, in 
ascending order.
-        The columns that are not specified are returned as well, but not used 
for ordering.
+        Return the smallest `n` elements.
 
         Parameters
         ----------

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to