From d9930f9b452e5dfecefbeeb17a23ba115dc4e8af Mon Sep 17 00:00:00 2001 From: minhhoang1023 <40023817+minhhoang1023@users.noreply.github.com> Date: Fri, 11 Feb 2022 02:24:19 +0700 Subject: [PATCH] Fix bug SI (#1346) --- .../behavioural_analysis/sentimentinvestor_view.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/gamestonk_terminal/common/behavioural_analysis/sentimentinvestor_view.py b/gamestonk_terminal/common/behavioural_analysis/sentimentinvestor_view.py index f7a0ef6a6cb..1526ff04e61 100644 --- a/gamestonk_terminal/common/behavioural_analysis/sentimentinvestor_view.py +++ b/gamestonk_terminal/common/behavioural_analysis/sentimentinvestor_view.py @@ -164,6 +164,8 @@ def display_trending( "AHI", ] + RAW_COLS = [col for col in RAW_COLS if col in df.columns.tolist()] + df.ticker = df.ticker.str.upper() df = df.set_index("ticker") @@ -172,16 +174,8 @@ def display_trending( print_rich_table( df[RAW_COLS].head(limit), - headers=[ - "Total", - "Twitter", - "Stocktwits", - "Yahoo", - "Likes", - "RHI", - "AHI", - ], + headers=[col.upper() for col in RAW_COLS], show_index=True, - index_name="Ticker", + index_name="TICKER", title=f"Most trending stocks at {timestamp}", )