File tree 2 files changed +23
-1
lines changed
2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -798,6 +798,22 @@ def group_any(ndarray[int64_t] out,
798
798
ndarray values,
799
799
ndarray[int64_t] labels,
800
800
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
+ """
801
817
cdef:
802
818
Py_ssize_t i, N=len(labels)
803
819
int64_t lab
Original file line number Diff line number Diff line change @@ -1222,7 +1222,13 @@ class GroupBy(_GroupBy):
1222
1222
@Substitution (name = 'groupby' )
1223
1223
@Appender (_doc_template )
1224
1224
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
+ """
1226
1232
labels , _ , _ = self .grouper .group_info
1227
1233
output = collections .OrderedDict ()
1228
1234
You can’t perform that action at this time.
0 commit comments