flasc.utilities.energy_ratio_utilities.add_power_ref

Contents

flasc.utilities.energy_ratio_utilities.add_power_ref#

flasc.utilities.energy_ratio_utilities.add_power_ref(df_: DataFrame, ref_cols: List[str])[source]#

Add the pow_ref column to a dataframe, given which columns to average over.

Parameters:
  • df (pl.DataFrame) -- The Polars DataFrame containing the column to bin.

  • ref_cols (list(str)) -- The name of the columns to average across.

  • df_ (DataFrame)

Returns:

A new Polars DataFrame with an additional pow_ref column

Return type:

pl.DataFrame