tamnd / tamnd/firepanda

skipna=False and numeric_only on the cumulative scans

Open
#338 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Mojo
Stars
1
Forks
0
PR merge metrics
PR metrics pending

Description

`cumsum`, `cumprod`, `cummax` and `cummin` in firepanda always step over a missing row and put it back in place, which is what pandas does at the default `skipna=True`.

`skipna=False` means the opposite: the first missing row poisons everything after it, so `[1, nan, 3]` gives `[1, nan, nan]` rather than `[1, nan, 4]`. That is a different scan and not a post-processing pass, because the poisoning has to propagate through the prefix ladder in `firepanda/kernel/cumulative.mojo` rather than being applied afterwards, or the answer is wrong wherever a block boundary falls between the first gap and the end.

`numeric_only=True` on a frame scan drops the non numeric columns rather than raising on them. That one is a filter over the schema and is small, but it belongs with this because both are declared on the same signatures and both currently refuse.

Both raise by name today with the reason in the message, which is honest and is not the end state.

Falls out of [#336](https://github.com/tamnd/firepanda/pull/336) and part of [#334](https://github.com/tamnd/firepanda/issues/334).

Contributor guide

Open the contributing guide

Research direction

Start in firepanda/kernel/cumulative.mojo, then trace the cumsum, cumprod, cummax, and cummin signatures and their frame schema handling. Verify the scan semantics against the [1, nan, 3] example and confirm frame scans omit non-numeric columns when numeric_only=True; done means neither option is rejected by name.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.