Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
"TypeError: 'set' object does not support indexing" using na_values in read_csv() #11374
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).
|
jreback
added Can't Repro CSV
labels
Oct 19, 2015
|
show it looks like you are directly running |
jreback
closed this
Oct 19, 2015
vlasisva
commented
Oct 27, 2015
|
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 |
vlasisva
commented
Oct 28, 2015
|
I installed pandas via pip Will check and get back to you. |
vlasisva
commented
Oct 28, 2015
|
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.
|
jreback
referenced
this issue
Oct 28, 2015
Closed
Tarball of pandas-0.17.0 on PyPI contains crash in parser.c #11463
|
Thanks, Jeff. That worked. |
vlasisva
commented
Oct 29, 2015
|
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 |
jreback
referenced
this issue
Oct 30, 2015
Closed
read_csv not parsing numeric na_values against floats #11480
jreback
added a commit
that referenced
this issue
Oct 30, 2015
|
|
jreback |
c3771fa
|
goyodiaz commentedOct 19, 2015
Test case: