So essentially I have been trying to use the DataReader function but to no avail.
I have imported all the relevant things in my code but everytime I use the DataReader function, I get a TypeError:
import pandas as pd
import pandas_datareader.data as web
import datetime as dt
import yfinance as yf
start_date = dt.datetime(2020, 1, 1)
end_date = dt.datetime(2021, 1, 1)
aapl_df = web.DataReader('AAPL', 'Yahoo', start=start_date, end=end_date)
For this I get this error:TypeError: download() got multiple values for argument 'start'
When I try this code instead:
import pandas_datareader.data as web
import pandas as pd
start_date = pd.to_datetime('2022-01-01')
end_date = pd.to_datetime('2022-06-14')
df = web.DataReader('AAPL', 'yahoo', start_date, end_date)
df.tail(10)
I get the output :
[100%%*] 1 of 1 completed
1 Failed download: ['AAPL']: ValueError("time data 'yahoo' does not match format '%Y-%m-%d'")
Can someone please help?
here, but the yahoo data returning null