inplace and ignore_index, decided once for the whole surface
- Dominant language
- Mojo
- Stars
- 1
- Forks
- 0
- Avg merge
- 1h 31m
- Merged PRs (30d)
- 640
Description
`inplace=True` and `ignore_index=True` are declared on `dropna`, `ffill`, `bfill`, `sort_values` and a growing list of others, and every one of them refuses today.
They are filed together and away from the other refusals because neither is per method. `inplace` is a question about whether a bound firepanda object can be mutated in place at all, which touches the `ArcPointer` sharing in `firepanda/py/frame.mojo` and the Arrow export lifetime rules in document 15: a consumer holding an exported array is reading the same memory, so mutating in place while an export is live is either a correctness problem or a copy nobody asked for. pandas itself has been discouraging `inplace` for years and it returns `None`, which is a third answer shape on top of the two the binding already has.
`ignore_index` replaces the result's labels with a fresh range. That is small on its own and pointless on its own, since the reason to want it is that you just dropped rows, so it belongs with whatever decides the `inplace` shape.
Doing these one method at a time would produce a different answer in each place, which is the outcome worth avoiding. Related to [#329](https://github.com/tamnd/firepanda/issues/329), which is the same argument about unimplemented keywords in general.
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 reading firepanda/py/frame.mojo, especially the ArcPointer sharing, and document 15 on Arrow export lifetime rules. Review related #329, #334, and #336 to understand the existing refusal surface. Done means one consistent, surface-wide decision for inplace and ignore_index rather than separate method-specific behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- pandas
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100