From 3ee94d7ec3512f87429196545500f9563d4ca63d Mon Sep 17 00:00:00 2001 From: Bart Broere Date: Sun, 25 Aug 2024 13:16:02 +0000 Subject: [PATCH] Fix a FutureWarning about downcasting combined with fillna --- upsetplot/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upsetplot/data.py b/upsetplot/data.py index 2d56b1c..2e1c2b3 100644 --- a/upsetplot/data.py +++ b/upsetplot/data.py @@ -300,7 +300,7 @@ def from_memberships(memberships, data=None): if df.shape[1] == 0: raise ValueError("Require at least one category. None were found.") df.sort_index(axis=1, inplace=True) - df.fillna(False, inplace=True) + df = df.fillna(0) df = df.astype(bool) df.set_index(list(df.columns), inplace=True) if data is None: