Skip to content

Commit

Permalink
Merge pull request #257 from rsfutch77/master
Browse files Browse the repository at this point in the history
Fix Yahoo Finance Import
  • Loading branch information
PrimozGodec authored Aug 23, 2023
2 parents 30b23d5 + b6a80c9 commit dd22eac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion orangecontrib/timeseries/datasources.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@

import pandas_datareader.data as web

from pandas_datareader import data as pdr

from Orange.data import Domain
from orangecontrib.timeseries import Timeseries

import yfinance as yf

log = logging.getLogger(__name__)

try:
Expand Down Expand Up @@ -79,7 +83,9 @@ def finance_data(symbol,
if until is None:
until = date.today()

f = web.DataReader(symbol, 'yahoo', since, until)
yf.pdr_override()

f = pdr.get_data_yahoo(symbol, since, until)
data = Timeseries.from_data_table(table_from_frame(f))

# Make Adjusted Close a class variable
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
# required to get current timezone
# adding it does not hurt, Pandas have it as a dependency
'python-dateutil',
'yfinance',
'pyqtgraph>=0.13.1',
],
extras_require={
Expand Down

0 comments on commit dd22eac

Please sign in to comment.