1
0
mirror of https://gitlab.com/simple-stock-bots/simple-stock-bot.git synced 2025-06-16 07:16:40 +00:00

bandaid on #55

This commit is contained in:
Anson Biggs 2021-04-24 11:42:47 -07:00
parent e7fa0ced5c
commit 0b44321754

View File

@ -100,13 +100,13 @@ class Router:
)
df.sort_values(by="Match", ascending=False, inplace=True)
if df["Match"].head().sum() < 300:
df["Match"] = df.apply(
lambda x: fuzz.partial_ratio(search, x["name"].lower()),
axis=1,
)
# if df["Match"].head().sum() < 300:
# df["Match"] = df.apply(
# lambda x: fuzz.partial_ratio(search, x["name"].lower()),
# axis=1,
# )
df.sort_values(by="Match", ascending=False, inplace=True)
# df.sort_values(by="Match", ascending=False, inplace=True)
symbols = df.head(20)
symbol_list = list(zip(list(symbols["symbol"]), list(symbols["description"])))