pandas-datareader

pandas_datareader, ImportError: cannot import name 'urlencode'

只谈情不闲聊 提交于 2021-01-05 11:31:29
问题 I am working fine with pandas_datareader, then today I installed below both yahoo finance from the below link trying to solve another issue. No data fetched Web.DataReader Panda pip install yfinance pip install fix_yahoo_finance After the above installtion, pandas_datareader cannot be used anymore. I googled it and I did add the below import, and pandas_datareader is still not working. from urllib.parse import urlencode Here is the error: Thank you so much for your help. from pandas

problem with 1m interval in get_data_yahoo(pandas_datareader)

ぃ、小莉子 提交于 2020-12-29 08:42:31
问题 I wrote from pandas_datareader import data as pdr import yfinance as yf data = pdr.get_data_yahoo("AAPL", start='2020-04-12', end='2020-04-13', interval="m") And I got a error KeyError 'Date' I heard people saying Yahoo finance API is down but I still can get the following code working correctly data = pdr.get_data_yahoo("AAPL", start='2020-04-12', end='2020-04-13') 回答1: pandas_datareader interval="m" means 1 month you need yfinance. pip download yfinance import yfinance a = yfinance.download

problem with 1m interval in get_data_yahoo(pandas_datareader)

回眸只為那壹抹淺笑 提交于 2020-12-29 08:42:30
问题 I wrote from pandas_datareader import data as pdr import yfinance as yf data = pdr.get_data_yahoo("AAPL", start='2020-04-12', end='2020-04-13', interval="m") And I got a error KeyError 'Date' I heard people saying Yahoo finance API is down but I still can get the following code working correctly data = pdr.get_data_yahoo("AAPL", start='2020-04-12', end='2020-04-13') 回答1: pandas_datareader interval="m" means 1 month you need yfinance. pip download yfinance import yfinance a = yfinance.download

problem with 1m interval in get_data_yahoo(pandas_datareader)

烈酒焚心 提交于 2020-12-29 08:41:01
问题 I wrote from pandas_datareader import data as pdr import yfinance as yf data = pdr.get_data_yahoo("AAPL", start='2020-04-12', end='2020-04-13', interval="m") And I got a error KeyError 'Date' I heard people saying Yahoo finance API is down but I still can get the following code working correctly data = pdr.get_data_yahoo("AAPL", start='2020-04-12', end='2020-04-13') 回答1: pandas_datareader interval="m" means 1 month you need yfinance. pip download yfinance import yfinance a = yfinance.download

pandas read_excel(sheet name = None) returns a dictionary of strings, not dataframes?

我怕爱的太早我们不能终老 提交于 2020-12-03 17:00:54
问题 The pandas read_excel documentation says that specifying sheet_name = None should return " All sheets as a dictionary of DataFrames ". However when I try to use it like so I get a dictionary of strings. target_file = "C:\file_here.xlsx" data = pd.read_excel(target_file) print(type(data)) data = pd.read_excel(target_file, sheet_name = None) print(type(data)) #print(data) for sheet in data: print(type(sheet)) This returns: <class 'pandas.core.frame.DataFrame'> <class 'collections.OrderedDict'>

pandas read_excel(sheet name = None) returns a dictionary of strings, not dataframes?

不打扰是莪最后的温柔 提交于 2020-12-03 16:59:43
问题 The pandas read_excel documentation says that specifying sheet_name = None should return " All sheets as a dictionary of DataFrames ". However when I try to use it like so I get a dictionary of strings. target_file = "C:\file_here.xlsx" data = pd.read_excel(target_file) print(type(data)) data = pd.read_excel(target_file, sheet_name = None) print(type(data)) #print(data) for sheet in data: print(type(sheet)) This returns: <class 'pandas.core.frame.DataFrame'> <class 'collections.OrderedDict'>

pandas read_excel(sheet name = None) returns a dictionary of strings, not dataframes?

好久不见. 提交于 2020-12-03 16:57:41
问题 The pandas read_excel documentation says that specifying sheet_name = None should return " All sheets as a dictionary of DataFrames ". However when I try to use it like so I get a dictionary of strings. target_file = "C:\file_here.xlsx" data = pd.read_excel(target_file) print(type(data)) data = pd.read_excel(target_file, sheet_name = None) print(type(data)) #print(data) for sheet in data: print(type(sheet)) This returns: <class 'pandas.core.frame.DataFrame'> <class 'collections.OrderedDict'>

Getting a “Future Warning” when importing for Yahoo with Pandas-Datareader

核能气质少年 提交于 2020-06-27 14:56:04
问题 I am currently , successfully, importing stock information from Yahoo using pandas-datareader. However, before the extracted data, I always get the following message: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead. Would anyone have an idea of what it means and how to fix it? 回答1: That's a change (at least) in location of pandas testing functions: no longer under pandas.util.testing , but under pandas.testing instead. It's a

Getting a “Future Warning” when importing for Yahoo with Pandas-Datareader

偶尔善良 提交于 2020-06-27 14:54:10
问题 I am currently , successfully, importing stock information from Yahoo using pandas-datareader. However, before the extracted data, I always get the following message: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead. Would anyone have an idea of what it means and how to fix it? 回答1: That's a change (at least) in location of pandas testing functions: no longer under pandas.util.testing , but under pandas.testing instead. It's a

Python pandas datareader no longer works for yahoo-finance changed url

自作多情 提交于 2020-01-12 04:08:23
问题 Since yahoo discontinued their API support pandas datareader now fails import pandas_datareader.data as web import datetime start = datetime.datetime(2016, 1, 1) end = datetime.datetime(2017, 5, 17) web.DataReader('GOOGL', 'yahoo', start, end) HTTPError: HTTP Error 401: Unauthorized is there any unofficial library allowing us to temporarily work around the problem? Anything on Quandl maybe? 回答1: I found the workaround by "fix-yahoo-finance" in https://pypi.python.org/pypi/fix-yahoo-finance