import math
import pandas_datareader as web
import numpy as web
import pandas as pd
from sklearn.preprocessing import MinMaxScaler
from keras.models import Sequential
from keras.layers import Dense, LSTM
import matplotlib.pyplot as plt
plt.style.use('fivethirtyeight')
df = web.DataReader('AAPL', data_source='yahoo', start='2012-01-01', end='2019-12-17')
df
AttributeError跟踪(最近一次呼叫最近) 在()中 ----> 1 df = web.DataReader('AAPL',data_source ='yahoo',start ='2012-01-01',end ='2019-12-17') 2#显示数据 3 df
AttributeError:模块'numpy'没有属性'DataReader'
答案 0 :(得分:0)
您正在覆盖web
。
尝试:
import pandas_datareader as web
import numpy as np