zhanghaitao1
4/6/2018 - 7:10 AM

multiIndex shift

multiIndex shift

        # For multiIndex DataFrame,when we want to shift on a given index,we should
        # use groupby(indexname).shift()
        d_factor=d_factor.groupby('sid').shift(1)