lincc-frameworks / lincc-frameworks/nested-pandas

Implement filtering with flat masks

Open
#274 1 comment 0 reactions 0 assignees View on GitHub
enhancement interface LSDB
Dominant language
Python
Stars
26
Forks
8
Avg merge
2d 2h
Merged PRs (30d)
9

Description

**Feature request**

It would be great if we can filter a nested series with a "flat" mask, boolean array of the same size as the flatten series.

```python
filtered = nested_series[nested_series.nest["a"] + nested_series.nest["b"] > 10.0]
```

**Before submitting**
Please check the following:

- [x] I have described the purpose of the suggested change, specifying what I need the enhancement to accomplish, i.e. what problem it solves.
- [x] I have included any relevant links, screenshots, environment information, and data relevant to implementing the requested feature, as well as pseudocode for how I want to access the new functionality.
- [ ] If I have ideas for how the new feature could be implemented, I have provided explanations and/or pseudocode and/or task lists for the steps.

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no files or tests; start by tracing the nested_series indexing path and the nest["a"] + nest["b"] mask expression shown. Determine how a flat boolean mask should align with flattened values, then add coverage for the example and verify that filtering returns the expected nested series.

Written by the indexing model from the issue text.

Assessment

Tech stack
pandas, python
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.