mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 20:42:26 +00:00
* Added handling for >,000,000 * black Co-authored-by: Colin Delahunty <colindelahunty@Colins-Air.indiana.edu>
This commit is contained in:
2
.pre-commit-config.yaml
vendored
2
.pre-commit-config.yaml
vendored
@@ -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
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user