glucopy.metrics.cv#
- glucopy.metrics.cv(df: DataFrame, per_day: bool = False, ddof: int = 1)[source]#
Calculates the Coefficient of Variation (CV) 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 coefficient of variation for each day. If False, returns the coefficient of variation 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. By default ddof is 1.
- Returns:
cv – Coefficient of variation of the CGM values.
- Return type:
float | pandas.Series
Notes
This function is meant to be used by
glucopy.Gframe.cv()