From a14c0988789dc0f049ff0c52267d2a45b2ff8a48 Mon Sep 17 00:00:00 2001 From: rjzamora Date: Mon, 12 Aug 2024 12:43:33 -0700 Subject: [PATCH] avoid calling array attribute on cudf Series --- dask_expr/_describe.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dask_expr/_describe.py b/dask_expr/_describe.py index a1878b4a..f55ae214 100644 --- a/dask_expr/_describe.py +++ b/dask_expr/_describe.py @@ -51,11 +51,16 @@ def _lower(self): SeriesQuantile(frame, q=percentiles, method=self.percentile_method), frame.max(split_every=self.split_every), ] + try: + unit = getattr(self.frame._meta.array, "unit", None) + except AttributeError: + # cudf Series has no array attribute + unit = None return DescribeNumericAggregate( self.frame._meta.name, is_td_col, is_dt_col, - getattr(self.frame._meta.array, "unit", None), + unit, *stats, )