Reputation: 11
I've tried to upload the following file .csv in mmy notebook of Jupiter, however, when I'm traying to execute the code but I got an exception: TypeError: parser_f() got an unexpected keyword argument 'encoding_errors'
Code:
df = pd.read_csv('DetalleCliente_20220309_3.csv',sep=';',header=0, decimal=',', encoding_errors='replace')
TypeError Traceback (most recent call last) in 1 # carga del fichero DetalleCliente 2 #, ,sep=';',header=0, decimal=',', encoding_errors='replace' ----> 3 df = pd.read_csv('DetalleCliente_20220309_3.csv',sep=';',header=0, decimal=',', encoding_errors='replace') 4 #df = pd.read_csv('DetalleCliente_20220309_3.csv',sep=';',header=0, decimal=',', encoding='utf8', parse_dates=['ANOMES__C'])
TypeError: parser_f() got an unexpected keyword argument 'encoding_errors'
Thanks
Upvotes: 1
Views: 2780
Reputation: 11
Check the version of pandas you're using. encoding_errors was added in version 1.3.0.
https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html
Upvotes: 1