(dfs, new, window=None)
return dfs, old
Emit new list of dfs and decayed data

    Parameters
    ----------
    dfs: list
        List of historical dataframes
    new: DataFrame, Series
        New data
    window: value

    Returns
    -------
    dfs: list
        New list of historical data
    old: list
        List of dataframes to decay
Emit new list of dfs and decayed data
Emit new list of dfs and decayed data
def diff_loc(dfs, new, window=None):
    """ Emit new list of dfs and decayed data

    Parameters
    ----------
    dfs: list
        List of historical dataframes
    new: DataFrame, Series
        New data
    window: value

    Returns
    -------
    dfs: list
        New list of historical data
    old: list
        List of dataframes to decay
    """
    dfs = deque(dfs)
    if len(new) > 0:
        dfs.append(new)
    old = []
    if len(dfs) > 0:
        mx = max(df.index.max() for df in dfs)
        mn = mx - pd.Timedelta(window) + pd.Timedelta('1ns')
        while pd.Timestamp(dfs[0].index.min()) < mn:
            o = dfs[0].loc[:mn]
            if len(old) > 0:
                old.append(o)
            else:
                old = [o]
            dfs[0] = dfs[0].iloc[len(o):]
            if not len(dfs[0]):
                dfs.popleft()

    return dfs, old
def diff_loc ( dfs , new , window = None ) : dfs = deque ( dfs ) if len ( new ) > 0 : dfs . append ( new ) old = [ ] if len ( dfs ) > 0 : mx = max ( df . index . max ( ) for df in dfs ) mn = mx - pd . Timedelta ( window ) + pd . Timedelta ( '1ns' ) while pd . Timestamp ( dfs [ 0 ] . index . min ( ) ) < mn : o = dfs [ 0 ] . loc [ : mn ] if len ( old ) > 0 : old . append ( o ) else : old = [ o ] dfs [ 0 ] = dfs [ 0 ] . iloc [ len ( o ) : ] if not len ( dfs [ 0 ] ) : dfs . popleft ( ) return dfs , old