median_or_mean_and_errors#

post_processors.median_or_mean_and_errors(value_plotted, ignored_parameters, quantile=0.8, mean=True)#

Compute the median or mean of values in column value_plotted in df, ignoring (i.e. grouping-by) columns in list ignored_parameters. Adds upper/lower estimates (aka error bars) for the values df["value_plotted"]. The estimates are taken over the variables NOT in df[x] for x in parameters using quantiles.

This function creates a new dataframe with 3 + len(ignored_parameters) columns named value_plotted, value_plotted``_08 and ``value_plotted``_02 and the strings in ``ignored_parameters.

Parameters:
  • df (pandas dataframe) – input dataframe with column value_plotted and parameters.

  • value_plotted (string) – the name of the column in df for which error bars are required.

  • ignored_parameters (list of strings) – the names of columns which are grouped-by to perform the quantile estimation. They will not be used together for the quantile estimate, use this for instance for the x variable in a y/x plot where error bars are computed on y over several seeds.

  • quantile (float, optional) – quantile value, by default 0.8

  • mean (boolean, optional) – True is mean is returned, False if median, by default True

Return type:

pandas dataframe