df['pct_change'] = df.price.pct_change() df['log_return'] = np.log(1 + df.pct_change)
pct_change: percentage change