sample_rows
Sample rows from a dataset using head, tail, or random methods. Inspect data shape with optional column projection and PII redaction.
Instructions
Return a sample of rows. Useful for understanding data shape without prior knowledge. Method: 'head', 'tail', or 'random'. Use columns=[] on wide tables to reduce response size. Pass seed (int) with method='random' for deterministic, reproducible sampling.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | Rows to sample (default 5, max 100) | |
| seed | No | Deterministic seed for method='random' (omitted = non-deterministic) | |
| method | No | Sampling method (default 'head') | head |
| redact | No | Scrub PII / credentials from sampled cells before return (default true). | |
| columns | No | Column projection (default: all) | |
| dataset | Yes | Dataset identifier | |
| redact_patterns | No | Additional Python regex patterns to layer on top of the built-in set. | |
| redact_skip_columns | No | Column names to exempt from redaction. |