Calculating difference between two rows in Python / Pandas
In python, how can I reference previous row and calculate something against it? Specifically, I am working with dataframes in pandas – I have a data frame full of stock price information that looks like this: