[Bug]: Solving polars Deprecation warnings for `is_in`
- Dominant language
- Python
- Stars
- 42
- Forks
- 18
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
### 📝 Description
The codebase is generating multiple deprecation warnings due to the use of Polars' `is_in` method with collections of the same datatype. The warning specifically states:
```
/home/adam/projects/mesa-frames/mesa_frames/concrete/agentset.py:453: DeprecationWarning: is_in with a collection of the same datatype is ambiguous and deprecated.
Please use implode to return to previous behavior.
See https://github.com/pola-rs/polars/issues/22149 for more information.
```
The issue affects multiple files across the codebase where `is_in` is used to check membership of Series/DatFrame elements against other Series/DataFrame columns. The affected pattern is typically:
```python
series.is_in(other_series)
```
Instead of the deprecated `is_in`, we need to use `implode()` to maintain the current behavior, as suggested by the deprecation message.
### 🔄 Steps to Reproduce
_No response_
### 🎯 Expected Behavior
_No response_
### 🚨 Actual Behavior
_No response_
### 🖥️ Python Version
_No response_
### Operating System
_No response_
### Relevant Packages
polars: >=1.30.0
### 📊 Relevant Log Output
_No response_
### ➕ Additional Context
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.