From c0f0787abc44db9d6f6e792f5af2eba3a34c2ce0 Mon Sep 17 00:00:00 2001 From: Linus Sehn Date: Wed, 26 Jan 2022 10:57:03 +0100 Subject: [PATCH] fixed bug in gen_ranking_plt --- explorer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/explorer.py b/explorer.py index 3fc8297..b6e8fc3 100644 --- a/explorer.py +++ b/explorer.py @@ -295,12 +295,12 @@ def gen_go_bar_stack(data, **kwargs): def gen_rank_plt(input_col, options, **kwargs): input_col_score = pd.Series(index=options) for i in range(1, 7): - input_col_counts = df[f"{input_col}[{i}]"].value_counts() + input_col_counts = df[filter][f"{input_col}[{i}]"].value_counts() scores = input_col_counts.multiply(scoring[i]) input_col_score = input_col_score.add(scores, fill_value=0) input_col_score = input_col_score.sort_values(ascending=False) if i == 1: - ranked_first = df[f"{input_col}[1]"].value_counts() + ranked_first = df[filter][f"{input_col}[1]"].value_counts() ranked_first_clean = pd.DataFrame( { "institution": ranked_first.index,