I am trying to do a groupby in a Pandas dataframe (column \'Mode\') followed by an apply that sums the values in column \'Sensor Glucose (mg/dL)\' for rows where the isInRan