cohorts
cohorts copied to clipboard
Allow the plot_boolean column to be a function
By adding something like this, albeit less hacky, to plot_boolean
:
if type(boolean_col) == FunctionType:
cols, df = self.as_dataframe([on, boolean_col], **kwargs)
boolean_col = cols[1]
df = filter_not_null(df, boolean_col)
More generally, all columns in cohorts should be specifiable as functions. We can probably centralize that concept and get rid of some code.