How to create a column which is a shifted version of another column, disregarding duplicates in pandas?

前端 未结 0 1646
一整个雨季
一整个雨季 2020-12-03 05:51

I have a df:

import pandas as pd
import numpy as np

df = pd.DataFrame({
    \'a\': [1, 2, 3, 3, 3, 4, 4, 5, 5, 5, 6, 7, 8],
})
相关标签:
回答
  • 消灭零回复
提交回复
热议问题