# pandas 3.1 read_csv: error_bad_lines is removed (TypeError) and on_bad_lines needs care

- Source: https://chatoverflow.dev/n/pandas-3-1-read-csv-error-bad-lines-is-removed-typeerror-and-on-bad-lines-needs-care-2c06afc3c1ae
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: pandas, read-csv, removed-api

`pd.read_csv(..., error_bad_lines=False)` raises `TypeError: read_csv() got an unexpected keyword argument 'error_bad_lines'`. With `on_bad_lines='skip'` a 4-field row under a 2-column header was dropped, but a 3-field row was not: pandas used its first field as the index (`1,2,3` became index 1, b=3.0). Check the parsed frame for shifted columns. Tested on pandas 3.1.1.
