def test_pct_change_shift_over_nas(self):
        s = Series([1., 1.5, np.nan, 2.5, 3.])

        chg = s.pct_change()
        expected = Series([np.nan, 0.5, np.nan, 2.5 / 1.5 - 1, .2])
        assert_series_equal(chg, expected)
dataset/ETHPy150Open pydata/pandas/pandas/tests/series/test_timeseries.py/TestSeriesTimeSeries.test_pct_change_shift_over_nas/original