From 8c9246ea4b13e61fcc3bdca2b896075e9276d7f4 Mon Sep 17 00:00:00 2001 From: FBruzzesi Date: Thu, 26 Sep 2024 22:53:46 +0200 Subject: [PATCH] fix: pyarrow group_by unique --- narwhals/_arrow/group_by.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/narwhals/_arrow/group_by.py b/narwhals/_arrow/group_by.py index 6c7b20485..27757dff8 100644 --- a/narwhals/_arrow/group_by.py +++ b/narwhals/_arrow/group_by.py @@ -20,6 +20,7 @@ "n_unique": "count_distinct", "std": "stddev", "var": "variance", # currently unused, we don't have `var` yet + "unique": "distinct", } @@ -32,6 +33,7 @@ def get_function_name_option(function_name: str) -> Any | None: "count_distinct": pc.CountOptions(mode="all"), "stddev": pc.VarianceOptions(ddof=1), "variance": pc.VarianceOptions(ddof=1), + "distinct": pc.CountOptions(mode="all"), } return function_name_to_options.get(function_name)