def _prev_index(self, s):
        self.set_index(max(0, self.index - 1))
def test_impl(n):
            df = pd.DataFrame({'A': np.ones(n), 'B': np.random.ranf(n)})
            Ac = df.A.cumsum()
            return Ac.sum()