From 82b974b814ebe09193d4ec297305917f0bed3371 Mon Sep 17 00:00:00 2001 From: gherka Date: Tue, 10 Oct 2023 09:27:06 +0100 Subject: [PATCH] Fixed an indexing bug in make_distinct custom constraint --- exhibit/core/constraints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exhibit/core/constraints.py b/exhibit/core/constraints.py index 1f3e601..b6e3730 100644 --- a/exhibit/core/constraints.py +++ b/exhibit/core/constraints.py @@ -626,7 +626,7 @@ def _make_distinct_within_group(group): group = group.cat.add_categories([""]) new_group = group.where(~group.duplicated(), "").tolist() - return pd.Series(new_group, name=target_col) + return pd.Series(new_group, index=group.index, name=target_col) final_result = [] target_cols = [x.strip() for x in target_str.split(",")]