Skip to content

Commit

Permalink
generalize dask case
Browse files Browse the repository at this point in the history
  • Loading branch information
FBruzzesi committed Jan 15, 2025
1 parent 129d734 commit 71df8b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion narwhals/_dask/namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ def __call__(self, df: DaskLazyFrame) -> Sequence[dx.Series]:
try:
then_expr = parse_into_expr(self._then_value, namespace=plx)
value_series = then_expr(df)[0]
if getattr(then_expr, "_returns_scalar", False): # literal or reduction case
# literal or reduction case
if then_expr._returns_scalar: # type: ignore[attr-defined]
_df = condition.to_frame("a")
_df["tmp"] = value_series[0]
value_series = _df["tmp"]
Expand Down

0 comments on commit 71df8b4

Please sign in to comment.