How to delete an error bad line in file.csv?
import pandas as pd
df = pd.read_csv(r"G:\file.csv", delimiter=',', error_bad_lines=False)
print(df.head())
My file is like this
column1, column2, column3
test, test, test
test2, test2, test2, te,st2
test3, test3, test3
te,st4, test4, te,st4, test4
I want to delete this line from file.csv and record to error.txt
test2, test2, test2, te,st2
te,st4, test4, te,st4, test4