splitvar/splitvar.py
def to_timedelta(freq,start="01/01/1970"):
    """Hacky method to retrieve the delta associated with a frequency
    Can't use inbuilt pandas to_timedelta. Really only works for delta < 1 day
    We assume a start date of 1 Jan 1970, which is a non-leap year
    """
    tmprange = pd.date_range(start=start,periods=2,freq=freq)
    
    return tmprange[1]-tmprange[0]
Hacky method to retrieve the delta associated with a frequency
    Can't use inbuilt pandas to_timedelta. Really only works for delta < 1 day
    We assume a start date of 1 Jan 1970, which is a non-leap year
    
Hacky method to retrieve the delta associated with a frequency
Can't use inbuilt pandas to_timedelta. Really only works for delta < 1 day
We assume a start date of 1 Jan 1970, which is a non-leap year
Hacky method to retrieve the delta associated with a frequency Can ' t use inbuilt pandas to_timedelta . Really only works for delta < 1 day We assume a start date of 1 Jan 1970 which is a non - leap year
def to_timedelta(freq,start="01/01/1970"):
    tmprange = pd.date_range(start=start,periods=2,freq=freq)
    return tmprange[1]-tmprange[0]
def to_timedelta ( freq , start = "01/01/1970" ) : tmprange = pd . date_range ( start = start , periods = 2 , freq = freq ) return tmprange [ 1 ] - tmprange [ 0 ]
Hacky method to retrieve the delta associated with a frequency
Can't use inbuilt pandas to_timedelta.
Hacky method to retrieve the delta associated with a frequency Can ' t use inbuilt pandas to_timedelta .
"""Hacky method to retrieve the delta associated with a frequency
    Can't use inbuilt pandas to_timedelta. Really only works for delta < 1 day
    We assume a start date of 1 Jan 1970, which is a non-leap year
    """
freq
start