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 @@ -885,6 +885,22 @@ def group_any(ndarray[int64_t] out,
885
885
ndarray values,
886
886
ndarray[int64_t] labels,
887
887
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
+ """
888
904
cdef:
889
905
Py_ssize_t i, N=len(labels)
890
906
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