From a584d669b38a18a2584b7c70e26e3cc52e75186f Mon Sep 17 00:00:00 2001 From: vicpaton Date: Thu, 5 Sep 2024 13:55:07 +0200 Subject: [PATCH] updated test --- networkcommons/utils.py | 1 - tests/test_utils.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/networkcommons/utils.py b/networkcommons/utils.py index 24ed171..75f97b8 100644 --- a/networkcommons/utils.py +++ b/networkcommons/utils.py @@ -222,7 +222,6 @@ def targetlayer_formatter(df, n_elements=25, act_col='stat'): df = df[act_col].head(n_elements) df = df.apply(lambda x: 1 if x > 0 else -1 if x < 0 else 0) - print(df) # Pivot wider dict_df = df.to_dict() diff --git a/tests/test_utils.py b/tests/test_utils.py index 2982259..31f823f 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -157,7 +157,7 @@ def test_decoupler_formatter_string(): def test_targetlayer_formatter(): df = pd.DataFrame({'TF': ['A', 'B', 'C', 'D'], 'sign': [1.5, -2, 0, 3]}).set_index('TF') - result = utils.targetlayer_formatter(df, n_elements=2) + result = utils.targetlayer_formatter(df, n_elements=2, act_col='sign') expected = {'D': 1, 'B': -1} assert result == expected