time_ratio#
- time_ratio(unit1='day', dt1=1.0, unit2='day', dt2=1.0, as_int=False)[source]#
Calculate the relationship between two sets of time factors
- Parameters:
unit1 (str) – units for the numerator
dt1 (float) – timestep for the numerator
unit2 (str) – units for the denominator
dt2 (float) – timestep for the denominator
as_int (bool) – round and convert to an integer
- Example::
ss.time_ratio(unit1=’week’, dt1=2, unit2=’day’, dt2=1, as_int=True) # Returns 14