# Numeric Range Check

Flag CSV numeric values outside an expected min/max range, with column selection, delimiter detection, and text or JSON reports.

## Run it

- **CLI:** `gizza tool numeric-range-check "name,age,score
Ada,34,98
Bo,150,71
Cy,-3,88" 'columns=age'`
- **Web:** https://gizza.ai/tools/numeric-range-check/
- **Agents:** machine-readable descriptor (parameters JSON Schema) at https://gizza.ai/tools/numeric-range-check/tool.json

## Inputs

- `data` — CSV data _(field)_
- `columns` — Columns to check _(field)_
- `min` — Minimum _(field)_
- `max` — Maximum _(field)_
- `inclusive` — Inclusive bounds _(field)_
- `header` — First row is header _(field)_
- `delimiter` — Delimiter _(field)_
- `non_numeric` — Non-numeric cells _(field)_
- `empty_ok` — Allow blank cells _(field)_
- `max_issues` — Max issues to list _(field)_
- `format` — Output format _(field)_

## Output

- Range report (text)

## Query parameters

Open the tool pre-filled and auto-run via URL:

- `data` — CSV data
- `columns` — Columns to check
- `min` — Minimum
- `max` — Maximum
- `inclusive` — Inclusive bounds
- `header` — First row is header
- `delimiter` — Delimiter
- `non_numeric` — Non-numeric cells
- `empty_ok` — Allow blank cells
- `max_issues` — Max issues to list
- `format` — Output format

Example: `https://gizza.ai/tools/numeric-range-check/?data=name%2Cage%2Cscore%0AAda%2C34%2C98%0ABo%2C150%2C71%0ACy%2C-3%2C88&columns=age&min=0&max=120&inclusive=true&header=true&delimiter=auto&non_numeric=flag&empty_ok=true&max_issues=50&format=text`

---

## About this tool

The **Numeric Range Check** validates pasted CSV data by checking selected columns against a minimum, maximum, or both. It reports every flagged cell with the data row, physical line, column name, value, and reason, then summarizes how many rows and cells were checked.

Use it for quick data-quality checks before importing a spreadsheet, running a model, or handing a CSV to another system. Columns can be named from the header row, selected by 1-based index for headerless data, or set to `all` when every column should be numeric and in range.

## Worked example

Input CSV:

```csv
name,age
Ada,34
Bo,150
Cy,-3
```

With `columns=age`, `min=0`, and `max=120`, the report flags Bo's `150` as above the maximum and Cy's `-3` as below the minimum.

## Limits and edge cases

- At least one of **Minimum** or **Maximum** must be provided; leave one blank for a one-sided range check.
- Inclusive bounds allow values equal to the min or max. Turn inclusive bounds off for a strict open interval.
- Non-numeric cells can be flagged as issues or ignored. `nan` and infinity are treated as non-numeric.
- The issue list is capped by **Max issues to list**, but the summary still reports the full flagged count.
- Delimiter auto-detection covers comma, tab, semicolon, and pipe based on the first non-blank row.

## FAQ

<details>
<summary>Can I check more than one column?</summary>

Yes. Enter column names or indexes separated by commas or new lines, such as `age, score`, or use `all` to check every column.

</details>

<details>
<summary>How are blank and non-numeric cells handled?</summary>

Blank cells are allowed by default and can be required by turning off **Allow blank cells**. Non-empty values that cannot be parsed as finite numbers are either flagged or ignored based on the **Non-numeric cells** setting.

</details>

<details>
<summary>Does it modify or reject CSV rows?</summary>

No. This is a report-only validator. It does not rewrite the CSV or block entries like a spreadsheet data-validation rule would.

</details>

<details>
<summary>Can I use only a minimum or only a maximum?</summary>

Yes. Leave the other bound blank to run a one-sided check such as “values must be at least 0” or “values must be at most 100”.

</details>

## Related tools

- [CSV Cell Diff](https://gizza.ai/tools/csv-cell-diff/): Compare two CSVs column-by-column and highlight every individual cell that changed, plus added and removed rows and columns.
- [Beancount to CSV Converter](https://gizza.ai/tools/beancount-to-csv/): Flatten Beancount or Ledger journal postings into spreadsheet-ready CSV, then rebuild a simple journal from that flat CSV schema.
- [Fuzzy Name Matcher](https://gizza.ai/tools/fuzzy-name-matcher/): Match and deduplicate person or organization names with Jaro-Winkler, Levenshtein and Soundex. Paste names, tune the threshold, export groups, pairs, CSV or JSON.
- [NMEA to CSV](https://gizza.ai/tools/nmea-to-csv/): Convert raw NMEA 0183 GPS/GNSS sentences into a timestamped CSV track with latitude, longitude, altitude, speed, course and fix quality.
- [Phone Number Formatter & Validator](https://gizza.ai/tools/phone-format/): Parse, validate and format any international phone number — E.164, national and international formats, country and line type. Free, in-browser.
