Initializing playground…
← Back to roadmap

cut / qcut: Binning Continuous Data

cut and qcut partition continuous numeric values into discrete intervals — the TypeScript equivalents of pandas.cut and pandas.qcut.

Integer bins

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

Explicit bin edges

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

Quartile split

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

Custom quantile probabilities

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

Decile labels

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

3. Return Value: BinResult

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

5. pandas Compatibility

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