You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
π€ This PR is maintained by Autoloop. Each accepted iteration adds a commit to this branch.
Program goal: Build tsb, a complete TypeScript port of pandas, one feature at a time. Program issue: #1 Current best metric: 137 pandas_features_ported
Iteration 295 β add Grouper class (pd.Grouper)
Adds src/groupby/grouper.ts implementing the Grouper helper class β the TypeScript equivalent of pandas.Grouper.
What's included:
Grouper class with key, level, freq, sort, closed, label, base options
parseFreq(freq) β parses frequency strings like "2h", "30min", "7D"
binFloor(tsMs, freq, closed) β floors a timestamp to a bin boundary for constant-ms frequencies
Grouper.binDate(date) β bins a Date value using the configured freq/closed/label/base
Full exports from src/groupby/index.ts and src/index.ts
Comprehensive test suite (tests/groupby/grouper.test.ts) with unit + property-based (fast-check) tests
The patch file is available in the agent artifact in the workflow run linked above.
To create a pull request with the changes:
# Download the artifact from the workflow run
gh run download 25117554579 -n agent -D /tmp/agent-25117554579
# Create a new branch
git checkout -b autoloop/build-tsb-pandas-typescript-migration
# Apply the patch (--3way handles cross-repo patches where files may already exist)
git am --3way /tmp/agent-25117554579/aw-autoloop-build-tsb-pandas-typescript-migration.patch
# Push the branch to origin
git push origin autoloop/build-tsb-pandas-typescript-migration
# Create the pull request
gh pr create --title '[Autoloop: build-tsb-pandas-typescript-migration]' --base main --head autoloop/build-tsb-pandas-typescript-migration --repo githubnext/tsessebe
tsb: pandas β TypeScript migration
π€ This PR is maintained by Autoloop. Each accepted iteration adds a commit to this branch.
Program goal: Build
tsb, a complete TypeScript port of pandas, one feature at a time.Program issue: #1
Current best metric: 137
pandas_features_portedIteration 295 β add
Grouperclass (pd.Grouper)Adds
src/groupby/grouper.tsimplementing theGrouperhelper class β the TypeScript equivalent ofpandas.Grouper.What's included:
Grouperclass withkey,level,freq,sort,closed,label,baseoptionsparseFreq(freq)β parses frequency strings like"2h","30min","7D"binFloor(tsMs, freq, closed)β floors a timestamp to a bin boundary for constant-ms frequenciesGrouper.binDate(date)β bins aDatevalue using the configured freq/closed/label/basesrc/groupby/index.tsandsrc/index.tstests/groupby/grouper.test.ts) with unit + property-based (fast-check) testsplayground/grouper.html)Metric: 136 β 137 (
pandas_features_ported, +1)Note
This was originally intended as a pull request, but the git push operation failed.
Workflow Run: View run details and download patch artifact
The patch file is available in the
agentartifact in the workflow run linked above.To create a pull request with the changes:
Show patch preview (500 of 839 lines)