We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f37f7e3 commit f535c40Copy full SHA for f535c40
metalearners/_narwhals_utils.py
@@ -29,6 +29,11 @@ def nw_to_dummies(
29
if set(categories) < set(x.unique()):
30
raise ValueError("We observed a value which isn't part of the categories.")
31
32
+ if any(x.is_null()):
33
+ raise ValueError(
34
+ "Can only apply nw_to_dummies on a narwhals Series without null values."
35
+ )
36
+
37
relevant_categories = categories[1:] if drop_first else categories
38
return x.to_frame().select(
39
[
0 commit comments