Make each AI task seperate for faster testing
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import os
|
||||
import yfinance as yf
|
||||
import pandas as pd
|
||||
import features
|
||||
|
||||
def pull():
|
||||
# Get the CWD for pathing due to being called from C# now
|
||||
@@ -19,8 +18,8 @@ def pull():
|
||||
print(f"Processing: {i} of {len(tickers)}")
|
||||
df = yf.download(symbol, period="max", auto_adjust=True)
|
||||
if not df.empty:
|
||||
# Use external featuers to make sure loaded is the same
|
||||
df = features.MakeFeatures(df, i)
|
||||
# Remove the ticker column
|
||||
df.columns = df.columns.get_level_values(0)
|
||||
# add to master list
|
||||
all_data.append(df)
|
||||
|
||||
@@ -28,9 +27,6 @@ def pull():
|
||||
print("Processing data")
|
||||
final_df = pd.concat(all_data)
|
||||
|
||||
# Cleanup the data
|
||||
final_df = features.CleanDF(final_df)
|
||||
|
||||
# Save to file
|
||||
print("Writing data to file")
|
||||
final_df.to_parquet(os.path.join(DATA_DIR, "stocks.parquet"))
|
||||
|
||||
Reference in New Issue
Block a user