From 7f6a356ec768c65f35cdce43862c1e13a7bf73a7 Mon Sep 17 00:00:00 2001 From: Hassan Kibirige Date: Mon, 19 Feb 2024 17:11:26 +0300 Subject: [PATCH] Fix pandas incompatible dtype setting deprecation --- plotnine/_utils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plotnine/_utils/__init__.py b/plotnine/_utils/__init__.py index 55b6b30e1..f30807255 100644 --- a/plotnine/_utils/__init__.py +++ b/plotnine/_utils/__init__.py @@ -244,7 +244,7 @@ def add_margins( for vlst in margin_vars[1:]: dfx = df.copy() for v in vlst: - dfx.loc[0:, v] = "(all)" + dfx[v] = "(all)" margin_dfs.append(dfx) merged = pd.concat(margin_dfs, axis=0)