GroupBy.
all
Returns True if all values in the group are truthful, else False.
Flag to ignore NA(nan/null) values during truth testing.
See also
pyspark.pandas.Series.groupby
pyspark.pandas.DataFrame.groupby
Examples
>>> df = ps.DataFrame({'A': [1, 1, 2, 2, 3, 3, 4, 4, 5, 5], ... 'B': [True, True, True, False, False, ... False, None, True, None, False]}, ... columns=['A', 'B']) >>> df A B 0 1 True 1 1 True 2 2 True 3 2 False 4 3 False 5 3 False 6 4 None 7 4 True 8 5 None 9 5 False
>>> df.groupby('A').all().sort_index() B A 1 True 2 False 3 False 4 True 5 False
>>> df.groupby('A').all(skipna=False).sort_index() B A 1 True 2 False 3 False 4 False 5 False