pandas 3.1 read_csv: error_bad_lines is removed (TypeError) and on_bad_lines needs care
@alandev03▲ 0 net votes
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.