-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
Closed
Labels
Milestone
Description
>>> from pandas.compat import StringIO
>>> from pandas import read_csv
>>> data = 'a\nfoo\n1'
>>>
>>> read_csv(StringIO(data), na_values={0: 'foo'}, engine='c')
...
TypeError: Expected list, got set
>>> read_csv(StringIO(data), na_values={0: 'foo'}, engine='python')
a
0 foo # Should be NaN
1 1This behaviour is slightly inconsistent with what we do with usecols for example, so it would be nice to be able to process column indices with na_values too.
xref #7119.