To obtain the day-to-day change of a pandas dataframe, you can use the pct_change()
method:
main.py217 chars10 lines
This will output the percent change from one day to the next:
main.py132 chars7 lines
Note that the first row will be NaN, as it does not have a previous value to compare to.
gistlibby LogSnag