File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change 5
5
from pandas import (DataFrame , to_datetime , concat )
6
6
from pandas_datareader .base import _DailyBaseReader
7
7
from pandas_datareader ._utils import (RemoteDataError , SymbolWarning )
8
- from pandas .core .indexes .numeric import Int64Index
9
8
import pandas .compat as compat
10
9
11
10
@@ -114,7 +113,7 @@ def read(self):
114
113
dfs = self ._dl_mult_symbols (self .symbols )
115
114
116
115
for k in dfs :
117
- if isinstance ( dfs [k ]. index , Int64Index ) :
116
+ if 'Date' in dfs [k ]:
118
117
dfs [k ] = dfs [k ].set_index ('Date' )
119
118
dfs [k ] = dfs [k ].sort_index ().dropna (how = 'all' )
120
119
Original file line number Diff line number Diff line change 5
5
from pandas_datareader .yahoo .daily import YahooDailyReader
6
6
import pandas .compat as compat
7
7
from pandas_datareader ._utils import (RemoteDataError , SymbolWarning )
8
- from pandas .core .indexes .numeric import Int64Index
9
8
10
9
11
10
class YahooFXReader (YahooDailyReader ):
@@ -65,7 +64,7 @@ def read(self):
65
64
else :
66
65
df = self ._dl_mult_symbols (self .symbols )
67
66
68
- if isinstance ( df . index , Int64Index ) :
67
+ if 'Date' in df :
69
68
df = df .set_index ('Date' )
70
69
71
70
if 'Volume' in df :
You can’t perform that action at this time.
0 commit comments