pandas datareader raises AttributeError: module 'pandas.io' has no attribute 'data'

后端 未结 6 900
长发绾君心
长发绾君心 2020-12-11 07:22

This is a code I am trying

import matplotlib.pyplot as plt    
import pandas as pd
ticker = \'GLD\'
begdate = \'2014-11-11\'
enddate = \'2016-11-11\'
data1 =         


        
6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-11 07:58

    You need to do

    import pandas.io.data as web
    

    then you can easily execute

    web.DataReader(stuff)
    

    Also, don't forget to import datetime as dt otherwise you'll catch another exception. Also, I've just was late for 1 sec :(

提交回复
热议问题