Skip to content

Commit

Permalink
avoid calling array attribute on cudf Series
Browse files Browse the repository at this point in the history
  • Loading branch information
rjzamora committed Aug 12, 2024
1 parent 39d09eb commit a14c098
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dask_expr/_describe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand Down

0 comments on commit a14c098

Please sign in to comment.