in spotify_confidence/analysis/bayesian/bayesian_base.py [0:0]
def _groupby_iterator(self, input_function, groupby, **kwargs):
groupby = [] if groupby is None else groupby
# Will group over the whole dataframe if groupby is None
level_groups = groupby if groupby else np.ones(len(self._data_frame))
remaining_groups = [group for group in self._all_group_columns if group not in groupby and group is not None]
for level_name, level_df in self._data_frame.groupby(de_list_if_length_one(level_groups)):
yield input_function(level_name, level_df, remaining_groups, groupby, **kwargs)