Pandas in the read_csv() in type error shown as:
TypeError Traceback (most recent call last)
Cell In[30], line 1
----> 1 pd.read_csv('Datasets/BX-Books.csv', sep=';',encoding='latin-1',error_bad_lines=False)
TypeError: read_csv() got an unexpected keyword argument 'error_bad_lines'
I have trying to run code is usaally in error_bad_lines parameter and run the code:
pd.read_csv('Datasets/BX-Books.csv', sep=';',encoding='latin-1',error_bad_lines=False)
but pandas old version is running and work but why do not work it and through error:
TypeError Traceback (most recent call last)
Cell In[30], line 1
----> 1 pd.read_csv('Datasets/BX-Books.csv', sep=';',encoding='latin-1',error_bad_lines=False)
TypeError: read_csv() got an unexpected keyword argument 'error_bad_lines'
According to the documentation this argument is deprecated and it was replaced by
on_bad_linesargument. Here is the detail for this new argument :on_bad_lines
{‘error’, ‘warn’, ‘skip’}or Callable, default‘error’Specifies what to do upon encountering a bad line (a line with too many fields). Allowed values are :
So you can use this parameter instead, here is an example of using this parameter in your code :