mesa / mesa/mesa-frames

[Bug]: Solving polars Deprecation warnings for `is_in`

Open
#174 2 comments 0 reactions 1 assignee View on GitHub

@adamamer20 is already working on this.

Since Aug 30, 2025.

  • #178 by @adamamer20 — merged
bug good first issue maintenance Sprints!
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.