NaN handling in percentile calcs
calculate_variable_percentile_thresholds_by_day
currently returns NA for a given day if there is aa single NA in the records for that day. I think we should ignore NAs, or alternatively at least have an option to ignore NAs.
np.nanpercentile()
can be used to ignore NaNs