(last, now, **kwargs)
return df
Example of querying over a time range since last update

    Parameters
    ----------
    last: pd.Timestamp
        Time of previous call to this function.
    now: pd.Timestamp
        Current time.
    freq: pd.Timedelta, optional
        The time interval between individual records to be returned.
        For good throughput, should be much smaller than the
        interval at which this function is called.

    Returns a pd.DataFrame with random values where:

    The x column is uniformly distributed.
    The y column is Poisson distributed.
    The z column is normally distributed.
Example of querying over a time range since last update
Example of querying over a time range since last update
def random_datablock(last, now, **kwargs):
    """
    Example of querying over a time range since last update

    Parameters
    ----------
    last: pd.Timestamp
        Time of previous call to this function.
    now: pd.Timestamp
        Current time.
    freq: pd.Timedelta, optional
        The time interval between individual records to be returned.
        For good throughput, should be much smaller than the
        interval at which this function is called.

    Returns a pd.DataFrame with random values where:

    The x column is uniformly distributed.
    The y column is Poisson distributed.
    The z column is normally distributed.
    """
    freq = kwargs.get("freq", pd.Timedelta("100ms"))
    index = pd.date_range(start=last + freq, end=now, freq=freq)

    df = pd.DataFrame({'x': np.random.random(len(index)),
                       'y': np.random.poisson(size=len(index)),
                       'z': np.random.normal(0, 1, size=len(index))},
                      index=index)
    return df
def random_datablock ( last , now , * * kwargs ) : freq = kwargs . get ( "freq" , pd . Timedelta ( "100ms" ) ) index = pd . date_range ( start = last + freq , end = now , freq = freq ) df = pd . DataFrame ( { 'x' : np . random . random ( len ( index ) ) , 'y' : np . random . poisson ( size = len ( index ) ) , 'z' : np . random . normal ( 0 , 1 , size = len ( index ) ) } , index = index ) return df