To return True or False for each group, you can pass a function by using the filter method. The filter method will return a subset of the data that contains only the groups that satisfy the condition. For example, df.groupby([‘col1’, ‘col2’]).filter(lambda x: x[‘col3’].mean() >= 10).