figureflow.figure_panel.FigurePanel.calculate_fractions

figureflow.figure_panel.FigurePanel.calculate_fractions = <function FigurePanel.calculate_fractions>

Allow calculating the fraction of specific groups in the data. Will generate a new dataframe with different rows that also will be used to plot data afterwards.

Parameters:

criteria – Dict of dicts. Each dict defines one fraction to calculate The key in the upper dict defines the name of the new group in each sub dict the key is a column and the value is a string to be used in a “query” expression, without the column e.g. for col_x to be larger than 10, the dict should be like this: ‘col_x’ : ‘> 10’