percentage change between the current and the prior element

Solutions on MaxInterview for percentage change between the current and the prior element by the best coders in the world

showing results for - "percentage change between the current and the prior element "
Elmer
25 Jun 2016
1s = pd.Series([90, 91, 85])
2s
30    90
41    91
52    85
6dtype: int64
7
8s.pct_change()
90         NaN
101    0.011111
112   -0.065934
12dtype: float64
13
similar questions