diff --git a/py-polars/polars/series/series.py b/py-polars/polars/series/series.py index 3bd8026651db..a651f8f77508 100644 --- a/py-polars/polars/series/series.py +++ b/py-polars/polars/series/series.py @@ -607,8 +607,12 @@ def shape(self) -> tuple[int]: def __bool__(self) -> NoReturn: msg = ( "the truth value of a Series is ambiguous" - "\n\nHint: use '&' or '|' to chain Series boolean results together, not and/or." - " To check if a Series contains any values, use `is_empty()`." + "\n\n" + "Here are some things you might want to try:\n" + "- instead of `if s`, use `if not s.is_empty()`\n" + "- instead of `s1 and s2`, use `s1 & s2`\n" + "- instead of `s1 or s2`, use `s1 | s2`\n" + "- instead of `s in [y, z]`, use `s.is_in([y, z])`\n" ) raise TypeError(msg)