'TypeError: parser_f() got an unexpected keyword argument 'encoding_errors'
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
Solution 1:[1]
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
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Marty |