Closed
Description
When a user tries to specify a non-existent argument in read_csv
the error message pertains to what seems to be an internal function (parser_f
). This behavior might be a bit surprising / confusing to users, who would expect the error message to refer to the function actually being used.
import pandas as pd
df = pd.read_csv("some_file.csv", bad_arg=True)
yields
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-2-d4606a60902f> in <module>()
----> 1 df = pd.read_csv("some_file.csv", bad_arg=True)
TypeError: parser_f() got an unexpected keyword argument 'bad_arg'