glucopy.metrics.mean#
- glucopy.metrics.mean(df: DataFrame, per_day: bool = False)[source]#
Calculates the mean of the CGM values.
- Parameters:
df (pandas.DataFrame) – DataFrame containing the CGM values. The dataframe must contain ‘CGM’ and ‘Day’ columns present in
glucopy.Gframe.data
.per_day (bool, default False) – If True, returns a
pandas.Series
with the mean for each day. If False, returns the mean for the entire dataset.
- Returns:
mean – Mean of the CGM values.
- Return type:
float | pandas.Series
Notes
This function is meant to be used by
glucopy.Gframe.mean()