diff --git a/barplots/barplots.py b/barplots/barplots.py index 2573e62..4724523 100644 --- a/barplots/barplots.py +++ b/barplots/barplots.py @@ -67,9 +67,9 @@ def barplots( "path":path.format(feature=feature).replace(" ", "_").lower(), **barplot_kwargs } for original, feature in zip(original, features) - if not pd.isna(groupby[original]).any().any() + if not pd.isna(groupby[original]).any().any() and not len(groupby[original]) == 0 ] - + if len(tasks) == 0: raise ValueError("No plottable feature found in given dataframe!") diff --git a/tests/test_wrong_parameters.py b/tests/test_wrong_parameters.py index 849ee9c..d46688d 100644 --- a/tests/test_wrong_parameters.py +++ b/tests/test_wrong_parameters.py @@ -11,7 +11,6 @@ def test_wrong_parameters(): barplots( df[df.cell_line == "CIAO"], ["cell_line", "task", "balancing", "model"], - orientation="pinco", path="{root}/{{feature}}.png".format(root=root) )