price
price
date
2010-01-04 34.57282657
2010-01-04 123.900000
2010-01-04 353.6789738
2010-01-04 13.08
2010-01-04 12.45
How can I create a first-differenced dataframe for each item in the list below? Code needs to be general. I tried:
listxx = ["price"]
for x in listxx:
globals().update({x_first_diff :x.diff().dropna()})
Expected Output:
price_first_diff
price_first_diff
2010-01-04
2010-01-04 89.33
...