Answers for "pandas previous row"

0

pandas previous row

In [11]: df1.change.shift(1)
Out[11]:
0          NaT
1   2014-03-08
2   2014-04-08
3   2014-05-08
4   2014-06-08
Name: change, dtype: datetime64[ns]
Posted by: Guest on October-21-2021

Python Answers by Framework

Browse Popular Code Answers by Language