glucopy.metrics.std#

glucopy.metrics.std(df: DataFrame, per_day: bool = False, ddof: int = 1)[source]#

Calculates the standard deviation 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 standard deviation for each day. If False, returns the standard deviation for the entire dataset.

  • ddof (int, default 1) – Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements.

Returns:

std – Standard deviation of the CGM values.

Return type:

float | pandas.Series

Notes

This function is meant to be used by glucopy.Gframe.std()