Skip to content

Commit

Permalink
typing
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemanley committed Dec 24, 2024
1 parent c6643df commit e153a9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py-polars/polars/series/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -3035,7 +3035,7 @@ def extend(self, other: Series) -> Self:
raise
return self

def filter(self, predicate: Series | Sequence[bool]) -> Self:
def filter(self, predicate: Series | Iterable[bool]) -> Self:
"""
Filter elements by a boolean mask.
Expand Down Expand Up @@ -3063,7 +3063,7 @@ def filter(self, predicate: Series | Sequence[bool]) -> Self:
"""
if is_bool_sequence(predicate, include_series=True):
predicate = Series("", predicate, dtype=Boolean)
elif isinstance(predicate, Sequence):
elif isinstance(predicate, Iterable):
predicate = Series("", predicate)
return self._from_pyseries(self._s.filter(predicate._s))

Expand Down

0 comments on commit e153a9e

Please sign in to comment.