mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-24 00:08:10 +00:00
feat(Data): added extra features, exploration notebook
This commit is contained in:
+1502
-1502
File diff suppressed because it is too large
Load Diff
+1502
-1502
File diff suppressed because it is too large
Load Diff
+1502
-1502
File diff suppressed because it is too large
Load Diff
+1502
-1502
File diff suppressed because it is too large
Load Diff
+1502
-1502
File diff suppressed because it is too large
Load Diff
+1502
-1502
File diff suppressed because it is too large
Load Diff
+1006
-1006
File diff suppressed because it is too large
Load Diff
+1006
-1006
File diff suppressed because it is too large
Load Diff
+1502
-1502
File diff suppressed because it is too large
Load Diff
+1006
-1006
File diff suppressed because it is too large
Load Diff
+1502
-1502
File diff suppressed because it is too large
Load Diff
+1006
-1006
File diff suppressed because it is too large
Load Diff
+1006
-1006
File diff suppressed because it is too large
Load Diff
+1502
-1502
File diff suppressed because it is too large
Load Diff
+1502
-1502
File diff suppressed because it is too large
Load Diff
+1502
-1502
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
+1
-1
@@ -7,7 +7,7 @@ crypto_tickers = ["BTC", "ETH", "BNB", "ADA", "SOL", "XRP", "DOT", "LTC", "UNI",
|
|||||||
etf_tickers = ["GLD", "IEF", "TLT", "SPY", "QQQ"]
|
etf_tickers = ["GLD", "IEF", "TLT", "SPY", "QQQ"]
|
||||||
tickers = crypto_tickers + etf_tickers
|
tickers = crypto_tickers + etf_tickers
|
||||||
|
|
||||||
add_features = False
|
add_features = True
|
||||||
|
|
||||||
#%%
|
#%%
|
||||||
for ticker in tickers:
|
for ticker in tickers:
|
||||||
|
|||||||
+4
-3
@@ -6,13 +6,14 @@ import os
|
|||||||
#%%
|
#%%
|
||||||
|
|
||||||
def load_files(path):
|
def load_files(path):
|
||||||
dfs = [load_df(os.path.join(path,f), f.split('.')[0]) for f in os.listdir(path) if os.path.isfile(os.path.join(path,f))]
|
dfs = [__load_df(os.path.join(path,f), f.split('.')[0]) for f in os.listdir(path) if os.path.isfile(os.path.join(path,f))]
|
||||||
return pd.concat(dfs, axis=1)
|
return pd.concat(dfs, axis=1)
|
||||||
|
|
||||||
def load_df(path, prefix):
|
def __load_df(path, prefix):
|
||||||
df = pd.read_csv(path, header=0, index_col=0).fillna(0)
|
df = pd.read_csv(path, header=0, index_col=0).fillna(0)
|
||||||
|
df = df.drop(columns=['open', 'high', 'low'])
|
||||||
df.columns = [prefix + "_" + c for c in df.columns]
|
df.columns = [prefix + "_" + c for c in df.columns]
|
||||||
return df
|
return df
|
||||||
|
|
||||||
load_files("data/")
|
|
||||||
# %%
|
# %%
|
||||||
|
load_files("data/")
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
from load_data import load_files
|
||||||
|
import pandas as pd
|
||||||
|
|
||||||
|
data = load_files()
|
||||||
|
|
||||||
Reference in New Issue
Block a user