Guide
How to Pick Columns from a CSV
Pick CSV columns by name or by position, and handle a semicolon file or a missing header.
What is a csv column picker?
A csv column picker is a tool that keeps the columns you name and drops every other field.
You paste a table, list the headers to keep, and read a smaller CSV back in that same order. The cut runs on your device, so a customer export never gets uploaded. People reach for it when a download is wider than the sheet they can share.
Pull name and email out of a wide CRM export before a mail merge. Drop a salary column before sharing a spreadsheet with someone who should not see pay.
The page is free to open, and there is no account to create.
Try the CSV Column Picker →How do you extract columns from csv?
Paste the table in the first box and the columns to keep in the second.
Separate names with commas, and keep the capitalization of each header exactly. The output follows the order you type rather than the order in the file.
Detection works by counting commas against semicolons on the first non-empty line, then checking tabs. That choice is the delimiter for the whole file, including every later row.
Input: the Ada row with name, age, city in that order.
| name | age | city |
|---|---|---|
| Ada | 30 | Pune |
For example, the list city,name on that table returns city before name. Typing 3 returns only the city column, and the notice calls the cut a position pick. Output: Pune stays under city, while the age column is gone.
Add Bob, 41, Goa under Ada and the same list returns a second row. Goa lines up under city, and 41 leaves with the age column.
Leave the second box empty and the whole table comes back with the detected delimiter. The summary names the headers, so you can confirm the read before you drop a field.
A second try is instant, because the cut updates as you type.
Should you pick by header name or by position?
Use a header name when the first row has labels, and use a column number only for positive integers.
The difference between them shows up when someone inserts a column. A position number is not a stable field name. Select csv columns by header so you keep csv columns after a new field appears. A name such as city still finds Pune after a phone field lands at the front. A number such as 3 then points at a different field, so the notice warns you.
Picking by position after a column is inserted keeps the wrong field in a tidy looking grid. Unlike a name, a slot number does not know what the field means. Use names on every file that already has a header row.
A mixed list such as city,3 is treated as names, so a column literally called 3 would have to exist. Numbers count as positions only when every entry is a positive integer.
Why does a semicolon file collapse to one column?
It collapses because a comma split of name;age sees one column and the picker switches.
The notice says the file was read as semicolon because a comma split it into one column. A semicolon csv is that European export, reread so the headers become columns you can name. Treating a semicolon file as comma-separated is how a European export becomes one smashed field. You do not pick the delimiter yourself, and the same check applies to every row.
Tabs win when a tab split produces more columns than a comma split. Keep city and name from a European semicolon export by typing those headers once the notice is up.
Quoted commas do not count as splits, because the parser honors quotes before it cuts. In a note cell that holds hello, world, keeping note preserves the comma inside the cell.
What happens when a header is missing?
It stops and names the missing header instead of writing a partial file.
For example, email against name and age stops the run and names email. Check the spelling and the capitalization, because Name does not match name.
A repeated header is a different problem, not a missing name. The first match is the column that stays in the output. A notice says a later column with the same name was left behind.
Ignoring a missing header and guessing the column would hide a typo until a later join fails. Correct the list and run the cut again instead of filling the gap by hand.
How do you read the notice?
Read the notice when it appears, because a quiet result can still be the wrong cut.
An ordinary comma file with a name list has no notice at all. A semicolon or tab file always explains why the delimiter changed. A position list always warns that inserting a column changes which field is kept.
Names do not set that position warning, even if you reorder the columns. If two headers share a name, the notice names the duplicate that was left behind.
Does the picker change cell values?
The picker does not edit cell values, so a date and a leading zero stay as written.
Quotes come back only when the cell contains the delimiter or a line break. A short row gains blank cells rather than borrowing a value from the next column.
What should you run before and after the cut?
Clean ragged rows first, then cut columns, then change format only if you need to.
Run the CSV Cleaner when rows disagree about how many fields they hold. After the cut, the CSV to JSON converter turns the smaller file into objects for an API.
When the smaller file should be tab separated, send it through the CSV to TSV converter.
What are the common mistakes?
Each common mistake below is a cut that looks finished and keeps the wrong field.
Related Tools
You May Also Need
You may also need
- CSV CleanerSquare ragged rows before you choose columns
- CSV to TSV ConverterChange the delimiter after the columns you need are left
Next steps
- CSV to JSON ConverterTurn the smaller CSV into JSON
- JSON to CSV ConverterCome back to CSV after an edit in JSON