Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #previous #row
ADD COMMENT
Topic
Name
4+5 =