Python error "'Series' object is not callable "
This line:
df['ln_returns'] = np.log(df['Close_mid']/df['Close_mid'](1))
Gives the following error:
'Series' object is not callable
If you are facing typeerror: 'series' object is not callable error then the problem maybe that you are trying to call ma function on a series object which is not possible, but you can do it like this:
df['ln_returns'] = np.log(df['Close_mid']/df['Close_mid'])