You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The other parameter in the is_in method is annotated to accept Expr | Collection[Any] | Series. However, passing a custom Collection raises a TypeError when is_in tries to convert the custom Collection to a pl.Series. The isinstance checks in pl.Series look for Sequences but not Collections, which is resulting in the TypeError. Perhaps the type annotation for the other parameter of is_in should be updated to reflect that pl.Series expects a Sequence instead of a Collection?
Expected behavior
Passing a custom Collection to is_in behaves the same as passing a native list, tuple, etc.
Checks
Reproducible example
This MRE shows
is_in
failing for a customCollection
but succeeding for a customSequence
.Log output
Issue description
The
other
parameter in theis_in
method is annotated to acceptExpr | Collection[Any] | Series
. However, passing a customCollection
raises aTypeError
whenis_in
tries to convert the customCollection
to apl.Series
. Theisinstance
checks inpl.Series
look forSequences
but notCollections
, which is resulting in theTypeError
. Perhaps the type annotation for theother
parameter ofis_in
should be updated to reflect thatpl.Series
expects aSequence
instead of aCollection
?Expected behavior
Passing a custom
Collection
tois_in
behaves the same as passing a nativelist
,tuple
, etc.Installed versions
The text was updated successfully, but these errors were encountered: