tamnd / tamnd/firepanda

The groupby surface has sixteen callables with proven behaviour and no Python door

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

Description

The conformance board can now name the callables that compute the right answer and cannot be called from Python, because a callable that passes at L2 and fails at L0 has already declared itself. Thirty nine names are in that position and sixteen of them are groupby.

`DataFrame.groupby`, `Series.groupby`, and `GroupBy.count`, `first`, `last`, `max`, `mean`, `median`, `min`, `nunique`, `sem`, `size`, `skew`, `std`, `sum` and `var`. Every one has passing behaviour cases through the Mojo driver and no name a pandas program can reach.

This is the largest single block of the kind [#330](https://github.com/tamnd/firepanda/pull/330) and [#336](https://github.com/tamnd/firepanda/pull/336) closed for the reductions and the transformations, and it should be next for that reason.

It is not the same shape of work as those two, and the difference is worth stating before somebody starts. A reduction and a transformation each answer with one object, so one boundary method taking a word and a number covered twelve of them. `df.groupby("k")` answers an intermediate object that holds a grouping and does nothing until something is asked of it, so there is a third bound type to build, with its own lifetime relationship to the frame it came from, before any of the fourteen aggregations has anywhere to live. `size`, `first` and `last` were left out of the reductions work precisely because they are grouped shapes, so they land here.

Measured in [`27-the-ladder-was-blocked-at-the-bottom.md`](https://github.com/tamnd/firepanda-compat/blob/main/docs/specs/27-the-ladder-was-blocked-at-the-bottom.md).

Contributor guide

Open the contributing guide

Research direction

Start with docs/specs/27-the-ladder-was-blocked-at-the-bottom.md and compare the boundary work in #330 and #336. Trace DataFrame.groupby, Series.groupby, and the fourteen GroupBy callables from the Mojo driver toward a Python entry point; done means all sixteen names are callable from Python while retaining their proven behaviour.

Written by the indexing model from the issue text.

Assessment

Tech stack
pandas, python
Domain
data-engineering
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.