Skip to content

Commit 9229f71

Browse files
committed
Updated docstrings
1 parent 8634bff commit 9229f71

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

pandas/_libs/groupby_helper.pxi.in

+16
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,22 @@ def group_any(ndarray[int64_t] out,
798798
ndarray values,
799799
ndarray[int64_t] labels,
800800
bint skipna):
801+
"""Aggregated boolean values to show if any group element is truthful
802+
803+
Parameters
804+
----------
805+
out : array of int64_t values which this method will write its results to
806+
values : array of values to be truth-tested
807+
labels : array containing unique label for each group, with its ordering
808+
matching up to the corresponding record in `values`
809+
skipna : boolean
810+
Flag to ignore nan values during truth testing
811+
812+
Notes
813+
-----
814+
This method modifies the `out` parameter rather than returning an object.
815+
The returned values will either be 0 or 1 (False or True, respectively).
816+
"""
801817
cdef:
802818
Py_ssize_t i, N=len(labels)
803819
int64_t lab

pandas/core/groupby.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,13 @@ class GroupBy(_GroupBy):
12221222
@Substitution(name='groupby')
12231223
@Appender(_doc_template)
12241224
def any(self, skipna=True):
1225-
"""Returns True if any value in the group is truthful, else False"""
1225+
"""Returns True if any value in the group is truthful, else False
1226+
1227+
Parameters
1228+
----------
1229+
skipna : bool, default True
1230+
Flag to ignore nan values during truth testing
1231+
"""
12261232
labels, _, _ = self.grouper.group_info
12271233
output = collections.OrderedDict()
12281234

0 commit comments

Comments
 (0)