cyberosa
commited on
Commit
·
9cc7b98
1
Parent(s):
e0d5f7e
fixing index error
Browse files- tabs/trader_plots.py +4 -2
tabs/trader_plots.py
CHANGED
@@ -323,8 +323,9 @@ def get_sevenday_rolling_average(active_traders_df: pd.DataFrame) -> pd.DataFram
|
|
323 |
.rolling(window=7)
|
324 |
.mean()
|
325 |
)
|
326 |
-
.reset_index(
|
327 |
)
|
|
|
328 |
|
329 |
# Calculate the total rolling average across all market_creators
|
330 |
local_df["market_creator"] = "all"
|
@@ -337,8 +338,9 @@ def get_sevenday_rolling_average(active_traders_df: pd.DataFrame) -> pd.DataFram
|
|
337 |
.rolling(window=7)
|
338 |
.mean()
|
339 |
)
|
340 |
-
.reset_index(
|
341 |
)
|
|
|
342 |
|
343 |
# Combine both results
|
344 |
combined_rolling_avg = pd.concat(
|
|
|
323 |
.rolling(window=7)
|
324 |
.mean()
|
325 |
)
|
326 |
+
.reset_index()
|
327 |
)
|
328 |
+
rolling_avg_by_market.rename(columns={0: "rolling_avg_traders"}, inplace=True)
|
329 |
|
330 |
# Calculate the total rolling average across all market_creators
|
331 |
local_df["market_creator"] = "all"
|
|
|
338 |
.rolling(window=7)
|
339 |
.mean()
|
340 |
)
|
341 |
+
.reset_index()
|
342 |
)
|
343 |
+
rolling_avg_total.rename(columns={0: "rolling_avg_traders"}, inplace=True)
|
344 |
|
345 |
# Combine both results
|
346 |
combined_rolling_avg = pd.concat(
|