[variability] drop nulls and nans so boxplots don't disappear

This commit is contained in:
jan 2025-11-14 01:19:05 -08:00
parent 48896c9529
commit 53d382088f

View File

@ -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')