Skip to content

Commit fc62e23

Browse files
committed
CLN: Rename module, backward compat
Rename FX to fx Remove use of Int64Index which was added in 0.20
1 parent 350de89 commit fc62e23

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pandas_datareader/yahoo/daily.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from pandas import (DataFrame, to_datetime, concat)
66
from pandas_datareader.base import _DailyBaseReader
77
from pandas_datareader._utils import (RemoteDataError, SymbolWarning)
8-
from pandas.core.indexes.numeric import Int64Index
98
import pandas.compat as compat
109

1110

@@ -114,7 +113,7 @@ def read(self):
114113
dfs = self._dl_mult_symbols(self.symbols)
115114

116115
for k in dfs:
117-
if isinstance(dfs[k].index, Int64Index):
116+
if 'Date' in dfs[k]:
118117
dfs[k] = dfs[k].set_index('Date')
119118
dfs[k] = dfs[k].sort_index().dropna(how='all')
120119

pandas_datareader/yahoo/FX.py renamed to pandas_datareader/yahoo/fx.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from pandas_datareader.yahoo.daily import YahooDailyReader
66
import pandas.compat as compat
77
from pandas_datareader._utils import (RemoteDataError, SymbolWarning)
8-
from pandas.core.indexes.numeric import Int64Index
98

109

1110
class YahooFXReader(YahooDailyReader):
@@ -65,7 +64,7 @@ def read(self):
6564
else:
6665
df = self._dl_mult_symbols(self.symbols)
6766

68-
if isinstance(df.index, Int64Index):
67+
if 'Date' in df:
6968
df = df.set_index('Date')
7069

7170
if 'Volume' in df:

0 commit comments

Comments
 (0)