tsb

string_ops_extended Advanced standalone string operations: split-expand, extract, partition, multi-replace, indent, dedent

string_ops_extended adds advanced string utilities that complement string_ops and the Series.str accessor. All functions accept a Series, an array, or a scalar string.

strSplitExpand — split and expand to DataFrame columns

Split each element by a delimiter and expand the parts into a DataFrame with one column per position. Mirrors pandas.Series.str.split(expand=True). Shorter rows are padded with null.


  

strExtractGroups — extract regex capture groups

Extract regex capture groups from each element into a DataFrame. Named groups ((?<name>...)) become column names; unnamed groups become 0, 1, … Non-matching rows produce null.

Use (?<name>...) for named capture groups.

  

strPartition / strRPartition — split into (before, sep, after)

strPartition splits at the first occurrence of the separator; strRPartition splits at the last. When the separator is not found, strPartition returns [s, "", ""] and strRPartition returns ["", "", s].


  

strMultiReplace — apply multiple replacements in sequence

Apply an ordered list of {pat, repl} pairs to each element. Each replacement is applied to the result of the previous one. Patterns can be string literals (replaced globally) or RegExp objects.


  

strIndent / strDedent — line-level indentation utilities

strIndent adds a prefix to every non-empty line (mirrors textwrap.indent). strDedent removes the common leading whitespace from all lines (mirrors textwrap.dedent).