tsb — Series.str Accessor
🔡 Series.str — Interactive Playground
Series.str gives you element-wise string operations on a
Series, mirroring pandas StringMethods.
Every method propagates null / NaN unchanged.
Edit any code block below and press ▶ Run
(or Ctrl+Enter) to execute it live in your browser.
Case Operations
Convert strings to lower, upper, title, or capitalized form.
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent
Length & Slicing
Get string length, extract substrings with slice(), or access individual characters with get().
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent
Strip & Pad
Remove whitespace (or specific characters) with strip(). Pad strings with ljust(), rjust(), center(), or zfill().
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent
Search & Match
Test membership with contains(), startswith(), endswith(). Use match() or fullmatch() for regex matching.
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent
Count, Find & Replace
Count pattern occurrences, find positions, and replace substrings.
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent
Extract
Extract the first regex capture group with extract(). Returns null when there is no match.
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent
Split & Join
Split strings with split() and reassemble with join(). Use cat() to concatenate element-wise.
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent
Predicates
Test character classes with isalpha(), isdigit(), isalnum(), islower(), isupper(), istitle(), isspace().
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent
Null Propagation
All methods pass null / NaN through unchanged, just like pandas.
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent