MCPcopy Create free account
hub / github.com/DVampire/FinAgent / cal_sentiment

Function cal_sentiment

finagent/processor/processor.py:51–58  ·  view source on GitHub ↗
(df, columns)

Source from the content-addressed store, hash-verified

49 return df
50
51def cal_sentiment(df, columns):
52 for col in columns:
53 if "sentiment" not in col:
54 df[col] = df.groupby("timestamp")[col].transform("sum")
55 else:
56 df[col] = df.groupby("timestamp")[col].transform("mean")
57 df[col] = df[col].fillna(0.5)
58 return df
59
60
61def cal_factor(df, level="day"):

Callers 1

_process_sentimentMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected