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

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
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