For an assignment I have to calculate the log returns of stocks. After I write df_ret = 100*(np.log(df) - np.log(df.shift(1))) I get the following error:
df_ret = 100*(np.log(df) - np.log(df.shift(1)))