mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-04 06:37:45 +00:00
fix(DataLoader): sort the dataframe when fetching data (#239)
This commit is contained in:
committed by
GitHub
parent
95b0499430
commit
4fc1070f45
+1
-1
@@ -95,7 +95,7 @@ def __load_data(
|
||||
]
|
||||
|
||||
X = target_asset_df + asset_dfs + exogenous_dfs
|
||||
X = pd.concat([df.sort_index().reindex(X[0].index) for df in X], axis=1).fillna(0.0)
|
||||
X = pd.concat([df.reindex(X[0].index) for df in X], axis=1).fillna(0.0)
|
||||
|
||||
X.index = pd.DatetimeIndex(X.index)
|
||||
|
||||
|
||||
@@ -60,4 +60,5 @@ for asset in tqdm(assets):
|
||||
return df
|
||||
|
||||
dfs = pd.concat([load_df(path + file) for file in files], axis=0)
|
||||
dfs.sort_index(inplace=True)
|
||||
dfs.to_parquet(f"./data/5min_crypto/{asset}.parquet")
|
||||
|
||||
Reference in New Issue
Block a user