Shift

Array shifting

source

shift_array

 shift_array (input_array:numpy.ndarray, offset:int)
import pandas as pd

np.random.seed(0)
array = np.random.rand(100)
series = pd.Series(array)
np.testing.assert_allclose(
    shift_array(array, 7),
    series.shift(7)
)