Open
Conversation
Agent-Logs-Url: https://github.com/githubnext/tsessebe/sessions/615193c1-c4f0-473c-bd90-e155a60846a7 Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add strGetDummies function for series in migration
Extract Apr 25, 2026
strGetDummies into a dedicated module
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Commit pushed:
|
Contributor
|
Evergreen fix applied ✅ The CI failure was a Biome formatter error in
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Autoloop iteration 281 intended to add
strGetDummies(port ofpandas.Series.str.get_dummies(sep)) as a fresh standalone function, but the symbol already lived inside the catch-allsrc/stats/string_ops.ts. The original auto-generated patch couldn't be applied (duplicate export, plus it used a non-existent positionalnew Series([...])constructor). This PR delivers the iteration's intent: promotestrGetDummiesto its own module and tighten its semantics to the spec.Implementation
src/stats/str_get_dummies.ts. Splits each Series element bysep(default"|"), returns aDataFrameof 0/1 indicator columns sorted lexicographically, preserves the input index.null/undefined/NaN(and"") now produce all-zero rows instead of falling throughString(NaN)and synthesizing a stray"NaN"column.Map, not a plain object, so integer-like tokens (e.g."0") keep their lexicographic position rather than being hoisted to the front by JS object key ordering.series.indexthroughDataFrame.fromColumns, preserving the row count when there are zero columns.Wiring
strGetDummiesandStrGetDummiesOptionsfromsrc/stats/string_ops.ts(and the now-unusedDataFrameimport / docstring entry).src/stats/index.tsandsrc/index.ts, including the previously-missingStrGetDummiesOptionstype.Tests & docs
tests/stats/string_ops.test.tsinto a dedicatedtests/stats/str_get_dummies.test.ts, expanded with explicitnull/undefined/NaN/ empty-string / index-preservation / integer-token cases, pandas-parity examples, and 5 fast-check properties (row count, 0-or-1 cells, index preservation, lexicographic columns, missing rows have row-sum 0).playground/str_get_dummies.htmlwith 4 runnable examples.Behavioral diff