mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 04:31:13 +00:00
Add columns to stocks/search (#5565)
* Add columns to `stocks/search` isin, cusip, figi, composite_figi, shareclass_figi * Update test_search[False].txt * Update test_search[True].txt * Delete tests/openbb_terminal/stocks/cassettes/test_stocks_helper/test_search.yaml * Create test_search.yaml --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
This commit is contained in:
@@ -206,6 +206,11 @@ def search(
|
||||
"industry_group",
|
||||
"industry",
|
||||
"exchange",
|
||||
"isin",
|
||||
"cusip",
|
||||
"figi",
|
||||
"composite_figi",
|
||||
"shareclass_figi",
|
||||
]
|
||||
]
|
||||
|
||||
@@ -223,7 +228,21 @@ def search(
|
||||
for x in v:
|
||||
exchange_suffix[x] = k
|
||||
|
||||
df = df[["name", "country", "sector", "industry_group", "industry", "exchange"]]
|
||||
df = df[
|
||||
[
|
||||
"name",
|
||||
"country",
|
||||
"sector",
|
||||
"industry_group",
|
||||
"industry",
|
||||
"exchange",
|
||||
"isin",
|
||||
"cusip",
|
||||
"figi",
|
||||
"composite_figi",
|
||||
"shareclass_figi",
|
||||
]
|
||||
]
|
||||
# To automate renaming columns
|
||||
df.columns = [col.replace("_", " ") for col in df.columns.tolist()]
|
||||
df = df.fillna(value=np.nan)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,2 +1,2 @@
|
||||
symbol name country sector industry group industry exchange
|
||||
0 MSFT Microsoft Corporation United States Information Technology Software & Services Software NMS
|
||||
symbol name country sector industry group industry exchange isin cusip figi composite figi shareclass figi
|
||||
0 MSFT Microsoft Corporation United States Information Technology Software & Services Software NMS US5949181045 594918104 BBG000BPHFS9 BBG000BPH459 BBG001S5TD05
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
symbol name country sector industry group industry exchange
|
||||
0 MSFT Microsoft Corporation United States Information Technology Software & Services Software NMS
|
||||
symbol name country sector industry group industry exchange isin cusip figi composite figi shareclass figi
|
||||
0 MSFT Microsoft Corporation United States Information Technology Software & Services Software NMS US5949181045 594918104 BBG000BPHFS9 BBG000BPH459 BBG001S5TD05
|
||||
|
||||
Reference in New Issue
Block a user