[英]AttributeError: module 'numpy' has no attribute 'DataReader'
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 Traceback (most recent call last) in () ----> 1 df = web.DataReader('AAPL', data_source='yahoo', start='2012-01-01', end='2019-12-17') 2 #Show the data 3 df
AttributeError Traceback (最近一次调用最后一次) in () ----> 1 df = web.DataReader('AAPL', data_source='yahoo', start='2012-01-01', end='2019-12- 17') 2 #显示数据 3 df
AttributeError: module 'numpy' has no attribute 'DataReader'
AttributeError: 模块 'numpy' 没有属性 'DataReader'
You're overwriting web
.你正在覆盖
web
。
Try:尝试:
import pandas_datareader as web
import numpy as np
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.