Initializing playground…
← Back to roadmap

📊 Series — Interactive Playground

Series is a one-dimensional labeled array — the TypeScript equivalent of pandas.Series. It supports element access, arithmetic, statistics, boolean masking, and missing-value handling.
Edit any code block below and press ▶ Run (or Ctrl+Enter) to execute it live in your browser.

Creating a Series

Construct a Series from an options object or use Series.fromObject() for key→value data.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

Properties

Inspect the size, shape, dtype, and other metadata of a Series.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

Element Access

Use at() / iat() for single elements, and loc() / iloc() for label-based or positional slicing.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

Arithmetic

Element-wise operations with a scalar or another Series: add, sub, mul, div, mod, pow.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

Comparison

Element-wise comparison returns a boolean Series: eq, ne, lt, le, gt, ge.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

Filtering & Boolean Masking

Use filter() with a boolean array or boolean Series to select elements.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

Missing Values

Detect, drop, and fill null / NaN values.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

Statistics

Aggregation and descriptive statistics: sum, mean, std, median, unique, valueCounts, and more.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

Sorting

Sort by values or by index labels, with control over direction and NA placement.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

🧪 Try It Yourself

Write your own tsb code below. All exports from tsb are available: Series, Index, RangeIndex, Dtype, and more.

TypeScript — Scratch Pad
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent