# CSV Without Header Row: Add Names Before Import

- Author: FastBankConvert (https://fastbankconvert.com)
- Published: 2026-10-17
- Category: CSV, JSON and text output
- Canonical: https://fastbankconvert.com/blog/csv-without-header-row

> What to do with a CSV without a header row: add column names, tell the import tool, and avoid losing the first transaction as a header.
A CSV without a header row starts straight with data, so the first line is a real record, not column names. Either add a header line yourself before importing, or tell the import tool the file has no header and name the columns there. Otherwise the tool treats your first transaction as headings and drops it.

## How can you tell a CSV has no header row?

Open the file in a plain text editor and read the first line. A header line holds words that describe columns, such as date, description and amount. A headerless file starts with values that look exactly like the lines below it: a date, a payee, a number. If line one could be a transaction, it probably is.

A spreadsheet is a poor place to check, because it may already have used the first line as headings and hidden the evidence. Notepad, TextEdit or any code editor shows the raw text. Look at the first two lines side by side. In a file with a header, they differ in kind. In a file without one, they have the same shape.

A few quick signs:

- **Line one contains a number with decimals.** Column names almost never do.
- **Line one contains a date.** Headers say "date", not "2026-05-01".
- **The line count is one more than you expected.** If a statement has 42 transactions and the file has 42 lines, there is no header. With a header it would have 43.
- **The import preview shows odd column names.** If a tool proposes columns called "2026-05-01" and "-18.40", it took a data line as the header.

The CSV format allows both forms. [RFC 4180, which documents the common CSV format](https://www.rfc-editor.org/rfc/rfc4180), describes the header as an optional first line in the same format as the records, and says software that cannot be told whether one is present has to decide for itself. That is why every import tool has a setting for it.

## Adding column names to a headerless CSV file

Adding a header means inserting one new first line with a name for each column, separated by the same delimiter the file uses. In a text editor, type the names at the very start, press Enter and save. There must be exactly as many names as fields in each data line.

### A worked example

Here is an example of a headerless file with four lines. The values are made up for illustration.

```
2026-05-01,COFFEE CORNER,-4.80,1203.55
2026-05-02,PAYROLL ACME CO,1850.00,3053.55
2026-05-02,ELECTRIC CO AUTOPAY,-96.12,2957.43
2026-05-04,"HARDWARE, ETC",-23.09,2934.34
```

With a header added, the same file reads:

```
date,description,amount,balance
2026-05-01,COFFEE CORNER,-4.80,1203.55
2026-05-02,PAYROLL ACME CO,1850.00,3053.55
2026-05-02,ELECTRIC CO AUTOPAY,-96.12,2957.43
2026-05-04,"HARDWARE, ETC",-23.09,2934.34
```

The last data line shows why counting matters. "HARDWARE, ETC" contains a comma, but it is inside quotes, so it is still one field. The line has four fields, and the header has four names. Counting raw commas on that line would give five, which is a reason to count fields rather than commas.

Two cautions for editing. Use a text editor rather than a spreadsheet when you can, because saving from a spreadsheet can change other things in the file, such as dates and leading zeros. And keep the original file. If the names turn out wrong, you can start again from it.

For many files at once, a short script does the same thing: write the header line, then copy the original file's contents after it. On most systems that is a one-line command.

## Telling each import tool the CSV has no header row

Every serious import tool has a setting that says whether line one is a header. Set it to "no header" and the tool keeps line one as data, then names the columns itself or lets you name them. The setting goes by different names: "first row contains headers", "header", or a choice to promote the first row.

How the common tools handle it:

| Tool | Where the setting is | Default |
| --- | --- | --- |
| Excel, Data, From Text/CSV | Power Query's "Use First Row as Headers" step, which you can remove | Usually promotes line one |
| Google Sheets import | Sheets treats every line as data | No header step |
| pandas `read_csv` | The `header` and `names` arguments | Takes line one as the header |
| PostgreSQL `COPY` | The `HEADER` option | No header expected |

The pandas defaults trip people up most. [The pandas read_csv reference](https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html) says that with no names passed, column names are inferred from the first line of the file. If you pass a list of `names`, the first line is read as data instead. For a headerless file, passing `names=["date", "description", "amount", "balance"]` does both jobs: it keeps line one and names the columns.

PostgreSQL is the opposite. [The PostgreSQL COPY reference](https://www.postgresql.org/docs/current/sql-copy.html) describes `HEADER` as an option you turn on to say the file has a header line, which is then discarded on input. Leave it off for a headerless file. Turn it on by mistake and the first transaction is thrown away.

In Excel, check the Applied Steps list in the Power Query editor. If a "Promoted Headers" step appears and the file has no header, delete it, then rename the columns by double-clicking each heading.

## The first transaction lost as a CSV header

The most common mistake with a headerless CSV is losing the first record. The import tool assumes line one is a header, uses its values as column names, and starts the data at line two. Nothing errors. The file loads, every later row is correct, and one transaction is simply missing.

That silence is what makes it costly. In the worked example above, an import that assumed a header would produce columns named "2026-05-01", "COFFEE CORNER", "-4.80" and "1203.55", and three data rows. The coffee purchase would be gone. In a budget, that is a small error. In a reconciliation, it is a difference you have to hunt for.

Three checks catch it:

1. **Read the column names in the preview.** If any of them look like data, the tool took a record as the header.
2. **Count the rows.** The imported row count should equal the number of transactions. One fewer is the signature of this mistake.
3. **Check the first date.** The earliest transaction in the imported data should match the first line of the file.

Bank data offers a fourth check. Add up the amounts and compare with the change in balance over the period. A missing first row shows up as a gap equal to that row's amount.

The reverse mistake also happens: telling a tool there is no header when there is one. The header line then loads as a record, and a column of numbers suddenly contains the word "amount". Tools that type columns will either reject the file or turn the whole column into text, so sums stop working.

## Why do some exports leave the CSV header row out?

Exports leave the header out on purpose more often than by accident. Some systems write files meant to be appended to each other, where a header on every file would land in the middle of the combined data. Others follow a fixed file layout agreed in advance, where the column order is documented and a header would be redundant.

Common reasons for a headerless export:

- **Append-style files.** A daily export of new transactions is easier to stack if no file carries a header.
- **Fixed specifications.** Some bank and payment file layouts define each column's position in a separate document.
- **Old systems.** Software written before header lines were common still writes files without them.
- **A setting left off.** Many export screens have an "include headers" box that is off by default.

A missing header is not a bug, but it moves a job to you: finding out what each column means. Look for the specification or help page of the system that produced the file. If there is none, compare a few lines with the source document. A column of numbers could be an amount or a balance, and which is which only becomes clear against the statement.

Signs inside the values help too. A column whose values only change by the amount in the previous column is a running balance. If amounts are written with a trailing minus or in brackets, the sign convention needs settling before any import; [negative numbers in CSV files](/blog/negative-numbers-in-csv) covers the forms you are likely to meet.

## Choosing CSV column names the next import will match

Choose header names that the receiving tool expects, written exactly as it expects them. Many apps map columns by name, so "Date" and "date" may be different to them, and "Amount " with a trailing space may match nothing. When the target documents its column names, copy them. When it does not, use short, lower-case names without spaces.

A few naming rules save trouble later:

- **One word or joined words.** `posted_on`, not `Posted On Date`.
- **No punctuation that the format uses.** A comma inside a name splits it in two.
- **Unique names.** Two columns called `amount` confuse every tool; use `debit` and `credit`, or `amount` and `balance`.
- **The same names every month.** A stable header means the second file maps exactly like the first.

Names also carry meaning that the data alone cannot. A column called `date` hides whether it is the posting date or the transaction date. If a scanned statement's dates were read by OCR, they may also need checking before import; [OCR misreading dates on bank statements](/blog/ocr-misread-dates-on-bank-statements) describes the usual errors.

Sometimes the real answer is a format that carries names with every value. In JSON, each field is stored with its key, so a missing header cannot happen. [JSON vs CSV](/blog/json-vs-csv) compares the two for transaction data. FastBankConvert, getting ready to open, is built to export statements as CSV, with dates, descriptions, amounts and balances in their own columns, or as JSON; [Get started](/get-started) adds you to the list.
