A frame transformation over axis=1
- Dominant language
- Mojo
- Stars
- 1
- Forks
- 0
- Avg merge
- 1h 31m
- Merged PRs (30d)
- 640
Description
Every frame transformation firepanda exposes runs down each column. pandas lets `axis=1` run across each row instead, so `df.diff(axis=1)` is each column minus the one to its left and `df.ffill(axis=1)` carries a value rightwards along a row.
Today `axis=1` raises by name with the reason in the message, which is the right refusal and not the right end state. It affects `shift`, `diff`, `ffill`, `bfill`, `dropna` and `cumsum` and its three siblings, so it is one kernel shape and not one fix per method.
It is a real piece of work rather than a plumbing change. A column store transforms down a column by walking contiguous memory, and transforming across a row means touching one element in each of N columns, which is a gather with a different type at every step. The columns have to agree on a type before the operation means anything, which is the same widening question `DataFrame.agg_all` had to answer for the reductions and probably wants the same three rules.
Falls out of [#336](https://github.com/tamnd/firepanda/pull/336) and part of [#334](https://github.com/tamnd/firepanda/issues/334).
Contributor guide
Research direction
Start by reviewing the current axis=1 refusal and the related work in #336 and #334. Trace the shared transformation kernel and the existing DataFrame.agg_all widening rules, then verify that shift, diff, ffill, bfill, dropna, cumsum, and its three siblings support row-wise behavior with compatible column types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- pandas
- Domain
- data-engineering
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100