pandas-datareader

ImportError: cannot import name 'PandasError'

若如初见. 提交于 2019-12-09 10:06:23
问题 I am very new to Python 3x, running on a mac. Currently using a sentdex tutorial for python with finance, tried running the following script: import datetime as dt import matplotlib.pyplot as plt from matplotlib import style import pandas as pd import pandas_datareader.data as web style.use('ggplot') start = dt.datetime(2000,1,1) end = dt.datetime(2016,12,31) df = web.DataReader('TSLA', 'yahoo', start, end) print(df.head()) However this returns the following error message: Traceback (most

How come pandas_datareader for google doesn't work?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 03:31:10
问题 I tried to grab data from google finance by the following code: import pandas_datareader.data as wb import datetime as dt start = dt.datetime(2015, 1, 1) end = dt.datetime(2017, 1, 1) dt = wb.DataReader('FB', 'google', start, end) dt.head() and I got this. UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 24697: invalid start byte But if I changed 'google' to 'yahoo' (by using yahoo finance instead), it works fine. So what's wrong with it? 回答1: There is an open issue here.

No module named pandas_datareader

此生再无相见时 提交于 2019-12-03 13:25:24
I have just installed pandas_datareader using pip install pandas-datareader which ran successfully. Now I am trying to use it for a tutorial and I am getting this error when I try to import. import pandas_datareader as pdr ModuleNotFoundError: No module named 'pandas_datareader' This is the link to the tutorial. https://www.datacamp.com/community/tutorials/finance-python-trading#gs.DgsO1BY Any ideas? Type into Terminal: pip install pandas_datareader That's it M_M In your Anaconda Prompt, do this : pip install pandas_datareader All the other methods didn't work for me. In command prompt: conda

ImportError: cannot import name 'PandasError'

坚强是说给别人听的谎言 提交于 2019-12-03 12:59:59
I am very new to Python 3x, running on a mac. Currently using a sentdex tutorial for python with finance, tried running the following script: import datetime as dt import matplotlib.pyplot as plt from matplotlib import style import pandas as pd import pandas_datareader.data as web style.use('ggplot') start = dt.datetime(2000,1,1) end = dt.datetime(2016,12,31) df = web.DataReader('TSLA', 'yahoo', start, end) print(df.head()) However this returns the following error message: Traceback (most recent call last): File "F:\Downloads\Python Work\try figuring thigns out\finance\try.py", line 1, in

How can I download stock price data with Python?

三世轮回 提交于 2019-12-03 12:21:20
I have installed pandas-daatreader but both the Google and Yahoo APIs for downloading historical stock price data have been deprecated. import pandas_datareader.data as web start_date = '2018-01-01' end_date = '2018-06-08' panel_data = web.DataReader('SPY', 'yahoo', start_date, end_date) ImmediateDeprecationError: Yahoo Daily has been immediately deprecated due to large breaks in the API without the introduction of a stable replacement. Pull Requests to re-enable these data connectors are welcome. See https://github.com/pydata/pandas-datareader/issues Could you advise me how I can access

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

南楼画角 提交于 2019-12-03 04:04:40
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? I found the workaround by "fix-yahoo-finance" in https://pypi.python.org/pypi/fix-yahoo-finance useful, for example: from pandas_datareader import data as pdr import fix_yahoo_finance data = pdr.get_data

DataReader google finance date not working

为君一笑 提交于 2019-12-01 00:50:06
I was just using pandas datareader to get the stock data for the past two weeks or so and it was working fine. All of a sudden since yesterday the date provided wasnt working anymore. It just gives me the past year data and I cant change the date. Used to work with the one commented out, but now its not. I even changed it to use datetime object, but still not working. Any idea? I updated pandas and pandas_datareader still no luck. Used another computer still didnt work. Did they just recently change the API? from pandas_datareader import data import datetime #start = '2010-01-01' #end = '2017

DataReader google finance date not working

二次信任 提交于 2019-11-30 19:24:27
问题 I was just using pandas datareader to get the stock data for the past two weeks or so and it was working fine. All of a sudden since yesterday the date provided wasnt working anymore. It just gives me the past year data and I cant change the date. Used to work with the one commented out, but now its not. I even changed it to use datetime object, but still not working. Any idea? I updated pandas and pandas_datareader still no luck. Used another computer still didnt work. Did they just recently

How to show a pandas dataframe into a existing flask html table?

怎甘沉沦 提交于 2019-11-30 00:34:36
This may sound a noob question, but I'm stuck with it as Python is not one of my best languages. I have a html page with a table inside it, and I would like to show a pandas dataframe in it. What is the best way to do it? Use pandasdataframe.to_html? py from flask import Flask; import pandas as pd; from pandas import DataFrame, read_csv; file = r'C:\Users\myuser\Desktop\Test.csv' df = pd.read_csv(file) df.to_html(header="true", table_id="table") html <div class="table_entrances" style="overflow-x: auto;"> <table id="table"> <thead></thead> <tr></tr> </table> </div> working example: python code

Downloading mutliple stocks at once from yahoo finance python

假如想象 提交于 2019-11-29 04:26:46
I have a question about the function of yahoo finance using the pandas data reader. I'm using for months now a list with stock tickers and execute it in the following lines: import pandas_datareader as pdr import datetime stocks = ["stock1","stock2",....] start = datetime.datetime(2012,5,31) end = datetime.datetime(2018,3,1) f = pdr.DataReader(stocks, 'yahoo',start,end) Since yesterday i get the error "IndexError: list index out of range", which appears only if I try to get multiple stocks. Has anything changed in recent days which I have to consider or do you have a better solution for my