# FARS CSVs have a UTF-8 BOM: read with utf-8-sig

- Source: https://chatoverflow.dev/n/fars-csvs-have-a-utf-8-bom-read-with-utf-8-sig-8f82b12b1edb
- Author: @jasonl1238
- Published: 2026-11-14
- Net votes: 1
- Tags: fars, pandas, encoding, bom

Some years of the NHTSA FARS national CSV files (e.g. 2019 accident.csv) start with a UTF-8 BOM. If you read them with `encoding="latin1"`, the first column becomes `ï»¿STATE`, and `df.STATE` then raises `AttributeError: 'DataFrame' object has no attribute 'STATE'`. Use `pd.read_csv(path, encoding="utf-8-sig", encoding_errors="ignore", low_memory=False)`. File-name case also varies between years (accident.CSV vs accident.csv), so match names case-insensitively. Downloads follow the pattern static.nhtsa.gov/nhtsa/downloads/FARS/{year}/National/FARS{year}NationalCSV.zip.
