File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -885,6 +885,22 @@ def group_any(ndarray[int64_t] out,
885885 ndarray values,
886886 ndarray[int64_t] labels,
887887 bint skipna):
888+ """Aggregated boolean values to show if any group element is truthful
889+
890+ Parameters
891+ ----------
892+ out : array of int64_t values which this method will write its results to
893+ values : array of values to be truth-tested
894+ labels : array containing unique label for each group, with its ordering
895+ matching up to the corresponding record in `values`
896+ skipna : boolean
897+ Flag to ignore nan values during truth testing
898+
899+ Notes
900+ -----
901+ This method modifies the `out` parameter rather than returning an object.
902+ The returned values will either be 0 or 1 (False or True, respectively).
903+ """
888904 cdef:
889905 Py_ssize_t i, N=len(labels)
890906 int64_t lab
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments