def lag(series, i=1):
    """
    Returns a series shifted backwards by a value. `NaN` values will be filled
    in the beginning.

    Same as a call to `series.shift(-i)`

    Args:
        series: column to shift backward.
        i (int): number of positions to shift backward.
    """

    shifted = series.shift(i)
    return shifted