Drop constant columns from a CSV

Paste a CSV and find the columns that never change — a single repeated value, or nothing at all. Report them, get per-column metrics, or download the table without them. Runs entirely in your browser.

Try:
Constant column report

About this tool

Constant Column Dropper finds the zero-variance columns in a CSV or delimited table — the ones that carry a single repeated value down every data row, or that contain nothing at all — and removes them.

Constancy is measured as one distinct value, not as a statistical variance of zero. That matters: the distinct-value rule works on text columns (country = US in every row) as well as numbers, and it handles blank cells without special-casing. Columns like this add no information to a model, a pivot, or a report — they just make the table wider.

Set Dominance below 100 to also catch near-constant columns: at 95, a column whose most common value covers 95% or more of the rows is flagged too. Everything runs locally in your browser — your data is never uploaded.

Worked example

Input:

id,country,score,notes
1,US,10,
2,US,20,
3,US,30,
4,US,40,

Default report:

Scanned 4 columns across 4 data rows (dominance 100%).
Found 2 constant columns; 2 columns remain.

Constant columns (dropped):
  "country" (col 2)  =  "US" in 4/4 rows (100%)
  "notes" (col 4)  =  all cells are empty

Use output=csv to get the table with those columns removed.

With Output = Cleaned CSV, the result is:

id,score
1,10
2,20
3,30
4,40

JSON metrics returns the same verdict per column plus the numbers behind it — distinct_values, top_value, top_count and top_share_percent — so you can script the decision instead of eyeballing it.

Options

Limits and edge cases

FAQ

What exactly counts as a constant column?

A column whose data rows hold exactly one distinct value after the optional case and whitespace normalization — or a column with no non-empty cells at all. That is the same rule as nunique() == 1 in a dataframe, or min == max, and unlike a statistical variance test it works on text columns too.

How do I catch columns that are almost constant?

Lower the Dominance threshold. At 95, a column is dropped when its most frequent value covers 95% or more of the counted rows — the "near-zero-variance" case that feature-selection tools flag alongside true constants. The report always shows the actual share, so you can see how close a call it was.

Does a blank cell count as a value?

Your choice. With Empty cells = Count as a value (the default) a column of gold, blank, gold has two distinct values and survives. With Skip when counting, blanks are removed first and the column reads as constant. Dataframe tools differ on this, which is why it is a switch rather than a fixed rule.

Can I protect an ID or label column from being dropped?

Yes. List it under Never drop these columns, by header name or by 1-based column number (id, 3). Protected columns stay in the cleaned CSV and are reported separately, so you still learn that they were constant.

Is my table uploaded anywhere?

No. The tool is compiled to WebAssembly and runs entirely in your browser. Your CSV/table data never leaves your device.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool constant-column-dropper "id,country,score,notes
1,US,10,
2,US,20,
3,US,30,
4,US,40,"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/constant-column-dropper/?data=id%2Ccountry%2Cscore%2Cnotes%0A1%2CUS%2C10%2C%0A2%2CUS%2C20%2C%0A3%2CUS%2C30%2C%0A4%2CUS%2C40%2C&header=true&delimiter=comma&dominance=100&empty_cells=value&ignore_case=true&ignore_whitespace=true&keep=id%2C%20country&output=report

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.