Utils#

Glucose units#

mgdl_to_mmoll(mgdl)

Convert mg/dL to mmol/L.

mmoll_to_mgdl(mmoll)

Convert mmol/L to mg/dL.

Time#

str_to_time(time_string)

Converts a string with format 'hh:mm:ss, hh:mm or hh' to a datetime.time object

time_factor(t)

Return the time factor of a given time string.

time_to_str(time)

Converts a datetime.time object to a string with format 'hh:mm:ss'

Datasets#

disjoin_days_and_hours(df[, date_column, ...])

Disjoins a dataframe with a column with datetime objects into a dataframe with columns for day, time and cgm values