Last answered:

01 Aug 2023

Posted on:

22 Nov 2021

1

AN error is occuring when we try to do wb.DataReader('PG' , data_source='yahoo', start='1995-1-1')

 Unable to read URL: https://finance.yahoo.com/quote/PG/history?period1=788932800&period2=1637639999&interval=1d&frequency=1d&filter=history

this is the error which is being displayed .. kindly show us how to rectify it

3 answers ( 0 marked as helpful)
Instructor
Posted on:

16 Dec 2021

0

Hi Shivam!
Thanks for reaching out!

We discovered that the problem can be fixed by upgrading pandas. Therefore, please open Anaconda Prompt or Terminal and execute:
pip install --upgrade pandas
pip install --upgrade pandas-datareader
Hope this helps.
Best,
Tsvetelin

Posted on:

21 Jun 2023

1

i do it but the issue still not solved 

PG = wb.DataReader('PG', data_source='yahoo', start='1995-01-01')
PG

Super learner
This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
Posted on:

01 Aug 2023

0

Hey Amal,


Try out below solution


Found following solution:

import pandas
from pandas_datareader import data as pdr
import yfinance as yfin
yfin.pdr_override()

df = pdr.get_data_yahoo("PG", start="1995-1-1", end="2023-1-1")
print(df)

Submit an answer