Questions tagged [pandas-datareader]

Up to date remote data access for pandas

Up to date remote data access for pandas: https://pandas-datareader.readthedocs.io/en/latest/

462 questions
58
votes
6 answers

import pandas_datareader gives ImportError: cannot import name 'is_list_like'

I am working in a virtual environment. I am able to import and work in pandas without any error but when I am trying to import pandas_datareader import pandas as pd import numpy as np import matplotlib.pyplot as plt import datetime as dt from…
Raj
  • 942
  • 1
  • 7
  • 12
56
votes
6 answers

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

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…
Motta
  • 567
  • 1
  • 5
  • 10
42
votes
5 answers

"TypeError: string indices must be integers" when getting data of a stock from Yahoo Finance using Pandas Datareader

import pandas_datareader end = "2022-12-15" start = "2022-12-15" stock_list = ["TATAELXSI.NS"] data = pandas_datareader.get_data_yahoo(symbols=stock_list, start=start, end=end) print(data) When I run this code, I get error "TypeError: string…
Deepak
  • 720
  • 1
  • 3
  • 12
26
votes
16 answers

No module named pandas_datareader

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:…
Goulouh Anwar
  • 737
  • 1
  • 11
  • 21
20
votes
2 answers

Python, Pandas datareader and Yahoo Error RemoteDataError: Unable to read URL

I am trying to download historical data from Yahoo using Pandas datareader. This is the code that I normally use: import pandas_datareader as pdr df = pdr.get_data_yahoo('SPY') However, I started receiving this error today: RemoteDataError: Unable…
Martingale
  • 511
  • 1
  • 6
  • 15
20
votes
5 answers

How to import a mysqldump into Pandas

I am interested if there is a simple way to import a mysqldump into Pandas. I have a few small (~110MB) tables and I would like to have them as DataFrames. I would like to avoid having to put the data back into a database since that would require…
Keith
  • 4,646
  • 7
  • 43
  • 72
18
votes
2 answers

Error in reading stock data : 'DatetimeProperties' object has no attribute 'weekday_name' and 'NoneType' object has no attribute 'to_csv'

I tried running the code to get stock data but it fails, showing the following error: 'DatetimeProperties' object has no attribute 'weekday_name' 'NoneType' object has no attribute 'to_csv' from pandas_datareader import data as web import…
sirishp
  • 201
  • 1
  • 2
  • 4
18
votes
5 answers

Downloading multiple stocks at once from Yahoo Finance

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 =…
ScharcoMolten
  • 183
  • 1
  • 1
  • 5
13
votes
9 answers

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

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,…
Scilear
  • 216
  • 1
  • 3
  • 10
10
votes
4 answers

How can I download stock price data with Python?

I have installed pandas-datareader but I'm wondering if there are alternatives. So far, I'm using this: import pandas_datareader.data as web start_date = '2018-01-01' end_date = '2018-06-08' panel_data = web.DataReader('SPY', 'yahoo', start_date,…
user8270077
  • 4,621
  • 17
  • 75
  • 140
10
votes
3 answers

ImportError: cannot import name 'PandasError'

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…
Tobias Nilsson
  • 121
  • 1
  • 1
  • 3
9
votes
3 answers

How to fix "ImportError: cannot import name 'StringIO'"

python version is 3.6.6 and pandas_datareader version is 0.7.0 when i import pandas_datareader, an error occurs like below. C:\PycharmProjects\Demo\venv\Scripts\python.exe C:/PycharmProjects/Demo/stock.py Traceback (most recent call last): File…
김장환
  • 91
  • 1
  • 1
  • 3
9
votes
1 answer

Zipline: using pandas-datareader to feed in Google Finance dataframe for non-US based financial markets

PLEASE NOTE: This question was successfully answered ptrj below. I have also written a blog post on my blog about my experiences with zipline which you can find here: https://financialzipline.wordpress.com I'm based in South Africa and I'm trying…
Simon
  • 19,658
  • 27
  • 149
  • 217
8
votes
5 answers

Installing LXML, facing a "legacy-install-failure" error

Trying to install lxml on Python 311. Faced with this error. PS C:\Users\chharlie\Desktop\code> pip install lxml Collecting lxml Using cached lxml-4.9.1.tar.gz (3.4 MB) Preparing metadata (setup.py) ... done Building wheels for collected…
siovjio spvjs
  • 81
  • 1
  • 1
  • 2
7
votes
4 answers

pandas_datareader, ImportError: cannot import name 'urlencode'

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…
roudan
  • 3,082
  • 5
  • 31
  • 72
1
2 3
30 31