Skip to content

[Autoloop] [Autoloop: build-tsb-pandas-typescript-migration]Β #220

@github-actions

Description

@github-actions

πŸ€– 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.

Linked Issue: #1
Current Best Metric: 134 pandas_features_ported (this iteration adds +1)
Branch: autoloop/build-tsb-pandas-typescript-migration

This Iteration (281): strGetDummies

Ports pandas.Series.str.get_dummies(sep) as the standalone function strGetDummies(series, { sep }).

What it does

  • Splits each string element by a separator (default "|")
  • Returns a DataFrame of binary indicator columns β€” one per unique token
  • Columns are sorted lexicographically
  • null / undefined / NaN values produce all-zero rows
  • Preserves the original Series index

Files changed

  • src/stats/str_get_dummies.ts β€” implementation
  • tests/stats/str_get_dummies.test.ts β€” unit + property-based tests
  • playground/str_get_dummies.html β€” interactive tutorial
  • src/stats/index.ts, src/index.ts β€” exports

Generated by Autoloop Β· ● 7.5M Β· β—·


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 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 24923038245 -n agent -D /tmp/agent-24923038245

# 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-24923038245/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] [Autoloop: build-tsb-pandas-typescript-migration]' --base main --head autoloop/build-tsb-pandas-typescript-migration --repo githubnext/tsessebe
Show patch preview (500 of 575 lines)
From 6855cb2de3e9575745938e92481282830adcc756 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Sat, 25 Apr 2026 05:05:08 +0000
Subject: [PATCH] [Autoloop: build-tsb-pandas-typescript-migration] Iteration
 281: add strGetDummies (str.get_dummies)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Port pandas.Series.str.get_dummies(sep) β€” splits each string by sep and
returns a DataFrame of binary indicator columns, one per unique token.
Sorted lexicographically. Null/undefined rows produce all-zero rows.

Run: https://github.com/githubnext/tsessebe/actions/runs/24923038245

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
 playground/str_get_dummies.html     | 127 +++++++++++++
 src/index.ts                        |   2 +
 src/stats/index.ts                  |   3 +
 src/stats/str_get_dummies.ts        | 109 ++++++++++++
 tests/stats/str_get_dummies.test.ts | 266 ++++++++++++++++++++++++++++
 5 files changed, 507 insertions(+)
 create mode 100644 playground/str_get_dummies.html
 create mode 100644 src/stats/str_get_dummies.ts
 create mode 100644 tests/stats/str_get_dummies.test.ts

diff --git a/playground/str_get_dummies.html b/playground/str_get_dummies.html
new file mode 100644
index 0000000..4d0624b
--- /dev/null
+++ b/playground/str_get_dummies.html
@@ -0,0 +1,127 @@
+<!doctype html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>tsb β€” str.get_dummies: multi-label string encoding</title>
+    <style>
+      * { box-sizing: border-box; margin: 0; padding: 0; }
+      body { font-family: system-ui, sans-serif; background: #0d1117; color: #c9d1d9; line-height: 1.6; padding: 2rem; }
+      h1 { color: #58a6ff; font-size: 1.8rem; margin-bottom: .5rem; }
+      h2 { color: #79c0ff; font-size: 1.2rem; margin: 2rem 0 .75rem; }
+      p  { color: #8b949e
... (truncated)

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions