>>> 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 1
This 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.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4