Commit c4fd3cd
Iteration 147: strSplitExpand, strExtractGroups, strPartition, strRPartition, strMultiReplace, strIndent, strDedent
Added src/stats/string_ops_extended.ts — 7 standalone advanced string operations:
- strSplitExpand: split strings and expand parts to DataFrame columns (mirrors pandas str.split(expand=True))
- strExtractGroups: extract regex capture groups (named or numbered) to DataFrame (mirrors pandas str.extract)
- strPartition / strRPartition: split at first/last occurrence of sep → (before, sep, after) tuple or DataFrame
- strMultiReplace: apply multiple find/replace pairs in sequence (string literals or RegExp)
- strIndent: prefix every non-empty line with a string (mirrors textwrap.indent)
- strDedent: remove common leading whitespace from all lines (mirrors textwrap.dedent)
All functions use TypeScript overloads for scalar vs Series/array dispatch. 50+ unit tests + 4 property-based tests (fast-check). Playground page string_ops_extended.html with interactive demos for all 7 functions.
Run: https://github.com/githubnext/tsessebe/actions/runs/24206383170
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 8b6229d commit c4fd3cd
6 files changed
Lines changed: 1312 additions & 0 deletions
File tree
- playground
- src
- stats
- tests/stats
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
307 | 312 | | |
308 | 313 | | |
309 | 314 | | |
| |||
0 commit comments