if you are facing an error: string indices must be integers I found a solution somewhere 0) pip install yfinance 1) import import yfinance as yf 2) yf.pdr_override() 3) df = pdr.get_data_yahoo(stocks, start, end) and run it
Great video, a little bit of suggestion for videos that you should make your live cam smaller in corner and zoom a little on the code that you are typing so people can see it clearly.
Hi Johnathon, A few questions: (1) when will you have the video available idincating how to import all ASX200 stocks, (2) How do we convert the Jupyter script to just a python script, (3) What is the maximum numbers of stocks you can request information on via a script
Hi Ron, thanks for your question. 1) there are no real tricks to this. Simply using a list of all ASX200 stocks will do the job. I recommend getting this list from ASX website. 2) copy the code from my website, link in description straight into python script editor. Idle/visual studio code whatever it may be. Python files end in .py 3) I do not know, this a more likely a restriction on the yahoo api bandwidth. Hopefully that helps
really great stuff, thx. a sidenote: please use s higher fontsize to simplify following if watching on a mobile phone... It is not always the Laptop, often it is browsing through sophisticated topics but with mobile phone, getting an idea of what is possible but....... standard fonts on the Display and too small to follow. Please use a reasonable fontsize... maybe 2 or 3 points higher, there is enough space for it to do so.... thx. :)
I'm getting the same error. File ~\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas_datareader\yahoo\daily.py:153, in YahooDailyReader._read_one_data(self, url, params) 151 try: 152 j = json.loads(re.search(ptrn, resp.text, re.DOTALL).group(1)) --> 153 data = j["context"]["dispatcher"]["stores"]["HistoricalPriceStore"] 154 except KeyError: 155 msg = "No data fetched for symbol {} using {}" TypeError: string indices must be integers
Actually I'm using Jupiter Lab in Anaconda. Are you using Visual Studio Code? How can you run python in VSC? What about Google Colab? what platform is better?
When I'm doing Close.plot() with plotly, its giving a "performance warning" and saying that the DataFrame is highly fragmented. Anyone know how to fix this error?
after either command to fill the dataframe, an exception occurs: File ~\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas_datareader\yahoo\daily.py:153, in YahooDailyReader._read_one_data(self, url, params) 151 try: 152 j = json.loads(re.search(ptrn, resp.text, re.DOTALL).group(1)) --> 153 data = j["context"]["dispatcher"]["stores"]["HistoricalPriceStore"] 154 except KeyError: 155 msg = "No data fetched for symbol {} using {}" TypeError: string indices must be integers
Would you mind explaining what code you wrote to bring in the data from yfinance? I've installed yfinance but it still doesn't seem to be working for the example in the video.
@@QuantPy how can I take out the data of particular time range ..lets say just 2 hours after market open for previous 1 year of any stock or indices . The goal is to find out the price range with 1st 2 hrs of last 1 year for any financial product
if you are facing an error: string indices must be integers
I found a solution somewhere
0) pip install yfinance
1) import import yfinance as yf
2) yf.pdr_override()
3) df = pdr.get_data_yahoo(stocks, start, end) and run it
thanks mate, saved me from going crazy
thank u vey much , I need to submit my project tommorow!
Thankyou so much, struck with that part for last 1hr, thanks a lot.
thanks very much helpful
thank you
I feel like I learned more useful stuff than in some of my actual uni courses. Just subscribed, looking forward to digging through your archive.
have you used any of his formulas for trading?
Best video on yahoo finance data fetching
This tutorial is so well done. Thank you thank you thank you!!
Great video, a little bit of suggestion for videos that you should make your live cam smaller in corner and zoom a little on the code that you are typing so people can see it clearly.
Niccceeee. This is exactly what I have been looking for. Thank you
doesn't work
TypeError: string indices must be integers
very well explained tutorial , thanks a lot @QuantPy !!
Hi Johnathon,
A few questions:
(1) when will you have the video available idincating how to import all ASX200 stocks,
(2) How do we convert the Jupyter script to just a python script,
(3) What is the maximum numbers of stocks you can request information on via a script
Hi Ron, thanks for your question.
1) there are no real tricks to this. Simply using a list of all ASX200 stocks will do the job. I recommend getting this list from ASX website.
2) copy the code from my website, link in description straight into python script editor. Idle/visual studio code whatever it may be.
Python files end in .py
3) I do not know, this a more likely a restriction on the yahoo api bandwidth.
Hopefully that helps
@@QuantPy hi Johnathon, the link from your website has expired. could you please send me the code for vs code? thanks a lot!
amazing video, this is great stuff please keep it coming. Thank you very much for giving up your time to do this.
Great stuff. Didn't know it's that easy using pandas. Thanks. (Y)
Loved it. Thank you sir!
Plotly NO.1
The link to the full code doesn't work
good stuff mate, worked like a (py) charm!
Very illustrative video
error: module is not found for pandas_datareader
really great stuff, thx.
a sidenote:
please use s higher fontsize to simplify following if watching on a mobile phone... It is not always the Laptop, often it is browsing through sophisticated topics but with mobile phone, getting an idea of what is possible but....... standard fonts on the Display and too small to follow.
Please use a reasonable fontsize... maybe 2 or 3 points higher, there is enough space for it to do so.... thx. :)
Thank you for the informative video.
Amazing, thx so much, support as always !
How to resolve the following error?
TypeError: string indices must be integers
code: df = web.get_data_yahoo(stocks,start,end)
I'm getting the same error.
File ~\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas_datareader\yahoo\daily.py:153, in YahooDailyReader._read_one_data(self, url, params)
151 try:
152 j = json.loads(re.search(ptrn, resp.text, re.DOTALL).group(1))
--> 153 data = j["context"]["dispatcher"]["stores"]["HistoricalPriceStore"]
154 except KeyError:
155 msg = "No data fetched for symbol {} using {}"
TypeError: string indices must be integers
Actually I'm using Jupiter Lab in Anaconda. Are you using Visual Studio Code? How can you run python in VSC? What about Google Colab? what platform is better?
Thanks for this tutorial.
Juste Data_source="Yahoo" doesn't work (NotImplementedError
df = pdr.get_data_yahoo(stocks,start,end)
df.head()
TypeError: string indices must be integers
You need to
Step 1) Pip install yfinance
Step 2) at the top section. import yfinace as yf
Step 3) above the df =, do, yf.pdr_override()
@@ENRICHEDK no longer woks get: AttributeError: module 'yfinance' has no attribute 'pdr_override'
Hello, I just stuck at the beginning, I got a bug with the pandas_datareader
im on mac and im not really sure how to get jupyter lab working i have pandas and pandas-datareader downloaded in python but it is not working
code is not accessbie
How to download ALL US stocks from Yahoo Finance? Does anyone has updated list of all tockesrs?
When I'm doing Close.plot() with plotly, its giving a "performance warning" and saying that the DataFrame is highly fragmented. Anyone know how to fix this error?
Any chance of doing this tutorial in yFinance?
after either command to fill the dataframe, an exception occurs:
File ~\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas_datareader\yahoo\daily.py:153, in YahooDailyReader._read_one_data(self, url, params)
151 try:
152 j = json.loads(re.search(ptrn, resp.text, re.DOTALL).group(1))
--> 153 data = j["context"]["dispatcher"]["stores"]["HistoricalPriceStore"]
154 except KeyError:
155 msg = "No data fetched for symbol {} using {}"
TypeError: string indices must be integers
Please do the following two lines:
import yfinance as yf
yf.pdr.override()
It works! Thank you!
i typed in the data reader command same as the episode , but its seems not working . Anything with the yahoo pdr.DatarReader ?
1 df=pdr.DataReader(stocks,'yahoo',start,end)
2 df=pdr.get_data_yahoo(stocks,start,end)
Sir can you help me sending that python cose !!
and how can fetch data from nepali stock market?
NEPSE
amazing stuff thank you
same code doesnt fetch data from me.. why?
How to Use DataReader to read the names of every stock on the market.
plssss
Hi, yes I can make a video on this. But will limit to a particular index ASX200.
How to get "Income Statement" fr Yahoo ?thx
clear, thx sir.
in my jupyter code is not working
string indices must be integers
anybody help
i am getting the same problem. TypeError: string indices must be integers
@@sefayay1249 my issue is resolve use yfinance library
Would you mind explaining what code you wrote to bring in the data from yfinance? I've installed yfinance but it still doesn't seem to be working for the example in the video.
btw the link to the code is not working idk y
RemoteDataError: Unable to read URL) does anyone know how to fix that ?
this seems to have stopped working? does yahoo need a key or something? google doesnt work either
Try pip updating the package. Check other comments
@@QuantPy how can I take out the data of particular time range ..lets say just 2 hours after market open for previous 1 year of any stock or indices .
The goal is to find out the price range with 1st 2 hrs of last 1 year for any financial product
Does anyone know how to fix this error
ValueError: Index contains duplicate entries, cannot reshape