cyberosa
commited on
Commit
·
0f3afed
1
Parent(s):
b152cf6
removing date filter for extreme cases
Browse files- tabs/tokens_dist.py +3 -6
tabs/tokens_dist.py
CHANGED
@@ -4,7 +4,7 @@ import matplotlib.pyplot as plt
|
|
4 |
import seaborn as sns
|
5 |
from seaborn import FacetGrid
|
6 |
import plotly.express as px
|
7 |
-
from datetime import datetime, UTC
|
8 |
from typing import Tuple
|
9 |
|
10 |
|
@@ -63,11 +63,8 @@ def get_based_votes_distribution(market_id: str, all_markets: pd.DataFrame):
|
|
63 |
def get_extreme_cases(live_fpmms: pd.DataFrame) -> Tuple:
|
64 |
"""Function to return the id of the best and worst case according to the dist gap metric"""
|
65 |
# select markets with some trades
|
66 |
-
|
67 |
-
|
68 |
-
selected_markets = live_fpmms.loc[
|
69 |
-
((live_fpmms["total_trades"] > 0) & (live_fpmms["sample_date"] == today))
|
70 |
-
]
|
71 |
selected_markets.sort_values(by="dist_gap_perc", ascending=False, inplace=True)
|
72 |
return (
|
73 |
selected_markets.iloc[-1].id,
|
|
|
4 |
import seaborn as sns
|
5 |
from seaborn import FacetGrid
|
6 |
import plotly.express as px
|
7 |
+
from datetime import datetime, UTC, date
|
8 |
from typing import Tuple
|
9 |
|
10 |
|
|
|
63 |
def get_extreme_cases(live_fpmms: pd.DataFrame) -> Tuple:
|
64 |
"""Function to return the id of the best and worst case according to the dist gap metric"""
|
65 |
# select markets with some trades
|
66 |
+
selected_markets = live_fpmms.loc[(live_fpmms["total_trades"] > 0)]
|
67 |
+
print(selected_markets.head())
|
|
|
|
|
|
|
68 |
selected_markets.sort_values(by="dist_gap_perc", ascending=False, inplace=True)
|
69 |
return (
|
70 |
selected_markets.iloc[-1].id,
|