pyflux
pyflux copied to clipboard
pandas.io.data is now deprecated in pandas 0.19rc2
in http://www.pyflux.com/metropolis-hastings/
import numpy as np
import pyflux as pf
try:
from pandas.io.data import DataReader
except:
from pandas_datareader.data import DataReader
from datetime import datetime
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
%matplotlib inline
fb = DataReader('FB', 'yahoo', datetime(2013,1,1), datetime(2016,6,10))
fb['Logged Adj Close'] = np.log(fb['Adj Close'].values)
plt.figure(figsize=(15,5))
plt.plot(fb.index[1:len(fb.index)],np.diff(fb['Adj Close'].values))
plt.ylabel('Returns')
plt.title('IBM Returns')
plt.show()
try:
from pandas.io.data import DataReader
except ImportError:
from pandas_datareader.data import DataReader
Thanks - I am aware of this, and will update docs when I see the deprecated module