diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 132d4a82a05..811fe787de4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: - id: check-merge-conflict - id: detect-private-key - repo: https://github.com/psf/black - rev: 21.7b0 + rev: 21.9b0 hooks: - id: black - repo: https://github.com/pycqa/flake8 diff --git a/gamestonk_terminal/stocks/government/quiverquant_view.py b/gamestonk_terminal/stocks/government/quiverquant_view.py index 1b6d550ae51..3284dfdd9e1 100644 --- a/gamestonk_terminal/stocks/government/quiverquant_view.py +++ b/gamestonk_terminal/stocks/government/quiverquant_view.py @@ -250,12 +250,22 @@ def display_government_sells( df_gov = df_gov[df_gov["TransactionDate"] > start_date].dropna() df_gov["min"] = df_gov["Range"].apply( - lambda x: x.split("-")[0].strip("$").replace(",", "").strip() + lambda x: x.split("-")[0] + .strip("$") + .replace(",", "") + .strip() + .replace(">$", "") + .strip() ) df_gov["max"] = df_gov["Range"].apply( - lambda x: x.split("-")[1].replace(",", "").strip().strip("$") + lambda x: x.split("-")[1] + .replace(",", "") + .strip() + .strip("$") + .replace(">$", "") + .strip() if "-" in x - else x.strip("$").replace(",", "") + else x.strip("$").replace(",", "").replace(">$", "").strip() ) df_gov["lower"] = df_gov[["min", "max", "Transaction"]].apply(