From 53d382088f3c3201eae247aa891b3f706845e1df Mon Sep 17 00:00:00 2001 From: jan Date: Fri, 14 Nov 2025 01:19:05 -0800 Subject: [PATCH] [variability] drop nulls and nans so boxplots don't disappear --- miscplot/variability.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/miscplot/variability.py b/miscplot/variability.py index b380aac..20c3c01 100644 --- a/miscplot/variability.py +++ b/miscplot/variability.py @@ -59,9 +59,9 @@ def variability_plot( vert_groups = set(vert_groups) df = polars.DataFrame(data_table) -# zero_bad: bool = True, -# if zero_bad: -# df.filter(col(data_col) != 0) + + # Drop nulls and nans so that the boxplots don't disappear + df = polars.drop_nulls(subset=[data_col]).drop_nans(subset=[data_col]) df = df.sort(groups) df_groups = df.select(groups).unique(maintain_order=True).with_row_index(name='x_pos')