BUG: fix the ingest_csv

This commit is contained in:
Baul
2017-12-23 16:20:25 +08:00
parent 67bd5c8f6a
commit 0408899998
+3 -1
View File
@@ -681,6 +681,7 @@ class ExchangeBundle:
last_traded=np.object_,
open=np.float64,
high=np.float64,
low=np.float64,
close=np.float64,
volume=np.float64
),
@@ -755,9 +756,10 @@ class ExchangeBundle:
)
for symbol in assets:
# here the symbol is the market['id']
asset = assets[symbol]
ohlcv_df = df.loc[
(df.index.get_level_values(0) == symbol)
(df.index.get_level_values(0) == asset.symbol)
] # type: pd.DataFrame
ohlcv_df.index = ohlcv_df.index.droplevel(0)