notebooks/common.py
def middle_date(t: pd.DataFrame) -> pd.DataFrame:
    """Get the middle date in the date range, into column 'Mean Date'."""
    
    # assumes dates in strings are ordered from first to last
    tokens = tokenise_dates(t['Date']) 
    t['Mean Date'] = tokens.apply(get_mean_date).astype('datetime64[ns]')
    return t
Get the middle date in the date range, into column 'Mean Date'.
Get the middle date in the date range, into column 'Mean Date'.
Get the middle date in the date range into column ' Mean Date ' .
def middle_date(t: pd.DataFrame) -> pd.DataFrame:
    tokens = tokenise_dates(t['Date']) 
    t['Mean Date'] = tokens.apply(get_mean_date).astype('datetime64[ns]')
    return t
def middle_date ( t : pd . DataFrame ) -> pd . DataFrame : tokens = tokenise_dates ( t [ 'Date' ] ) t [ 'Mean Date' ] = tokens . apply ( get_mean_date ) . astype ( 'datetime64[ns]' ) return t
Get the middle date in the date range, into column 'Mean Date'.
Get the middle date in the date range into column ' Mean Date ' .
"""Get the middle date in the date range, into column 'Mean Date'.""" # assumes dates in strings are ordered from first to last
t
pd.DataFrame