-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
"TypeError: 'set' object does not support indexing" using na_values in read_csv() #11374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You must be picking up another version of pandas somehow. The error you are seeing IIRC is from a somewhat older version of pandas This works just fine on linux with 3.4 (mac is below).
|
show it looks like you are directly running |
I see exactly the same error:
0.17.0
lsb_release --all Codename: trusty
|
More facts:
In order to clean my python environment as much as possible I uninstalled every non-distro package/version and every distro package not installed by default except dependencies of other software I use: python2.7 numpy, python2.7 gdal bindings, gnome stuff... I even uninstalled pip (packaged python3 pip is almost useless in willy anyway). I also did my best to ensure there where nothing python-related in ~/.local/bin, ~/.local/lib, /usr/local/bin and /usr/local/lib. I also made sure there were nothing called pandas in every mounted file system. I then used get-pip.py to install pip2 and pip3 and installed python2 and python3 pandas. The issue is still present. While this is not critical to me (it just broke one test for a function I never use in that way) I would really like to understand what's going on, but I do not know where to look at. |
so the error line:
tells me that you are using some kind of development version of pandas (somewhere). This function DOES not exist in master or 0.17.0. pls make sure that you are not in a development directory when trying to import pandas. Its not clear what you actually have installed, so pls create a new virtual env or use |
I installed pandas via pip Will check and get back to you. |
My "pip install pandas==0.17.0" downloads which contains file pandas/parser.c, static kh_float64_t ___pyx_f_6pandas_6parser_kset_float64_from_list(PyObject ); /_proto/ |
ok, it appears that when I distributed this it didn't rebuild the .c files (and had a newer version I was testing out). very odd. so will fix for 0.17.1 (e.g. will make a clean version). you can simply regenerate the .c files (you need cython installed). e.g.
|
Thanks, Jeff. That worked. |
Other than this bug, would you consider pip-obtained pandas 0.17.0 as safe to use? |
yep as I said the .c for he parser came from a or which is now merged |
…eption when reading a csv of floats with na_values of a scalar, #11374
Test case:
The text was updated successfully, but these errors were encountered: