Open granthoff1107 opened 3 years ago
Not sure if this is related to my package versions or python version but I fixed this issue by using the following code instead:
for idx, row_tick in enumerate(tickers_processed.itertuples(), 1):
upd_row_sent = row_tick.sentiment
upd_row_score = row_tick.score
for row_data in data_df.itertuples():
if(row_tick.Index in row_data.tickers):
upd_row_sent += row_data.sentiment['compound'] / row_tick.counts
upd_row_score += int(row_data.score) / row_tick.counts
tickers_processed.set_value(row_tick.Index, 'sentiment', upd_row_sent)
tickers_processed.set_value(row_tick.Index, 'score', upd_row_score)
I am redoing all of the process, to be faster, the new version will be better.
Process.py throws an error when running calculate_df
at line:
Exception has occurred: NotImplementedError ix is not iterable File "C:\Users\MyUser\Desktop\NLP\trading-bot-base\tickerrain\process.py", line 113, in calculate_df for idx, row_tick in enumerate(tickers_processed.iloc): File "C:\Users\MyUser\Desktop\NLP\trading-bot-base\tickerrain\process.py", line 152, in processed_df return calculate_df(df), calculate_df(df_3), calculate_df(df_1) File "C:\Users\MyUser\Desktop\NLP\trading-bot-base\tickerrain\process.py", line 157, in processing_last last_processed, last_processed_3, last_processed_1 = processed_df() File "C:\Users\MyUser\Desktop\NLP\trading-bot-base\tickerrain\process.py", line 169, in
asyncio.run(processing_last())