import math
import numpy as np
import pandas as pd
import yfinance as yf
import pandas_datareader as data
import datetime as dt
from keras.models import Sequential
from keras.layers import Dense, LSTM
start_date = dt.datetime(2006, 1, 1)
end_date = dt.datetime(2016, 1, 1)
df = data.DataReader(‘FPT’, data_source = ‘yahoo’, start = start_date, end = end_date)
df
and this is error
AttributeError Traceback (most recent call last)
in <cell line: 4>()
2 end_date = dt.datetime(2016, 1, 1)
3
—-> 4 df = data.DataReader(‘FPT’, data_source = ‘yahoo’, start = start_date, end = end_date)
5 df
3 frames
/usr/local/lib/python3.10/dist-packages/pandas_datareader/yahoo/daily.py in _read_one_data(self, url, params)
150 ptrn = r”root.App.main = (.*?);n}(this));”
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:
AttributeError: ‘NoneType’ object has no attribute ‘group’
i want to use data from yahoo. I also know that i can use “yfinance” but i want to try “DataReader”. I very appreciate
Thái is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.