-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
take_1d yields surprising results when working with SparseArray #19506
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
Those |
Ah, I see now you were actually working on that issue I linked to :-) |
Yea I had a feeling it was related. That problem is a lot harder than I expected on first take... have a PR that's somewhat done but a lot of weird edge cases. |
Also I would never use algos as a user. I was just looking for advice on fixing something else related to merging sparse frames. |
Yes, sure! That's only not always clear from the issue post :) |
Ideally |
This is fixed by #22325. |
Makes SparseArray an ExtensionArray. * Fixed DataFrame.__setitem__ for updating to sparse. Closes pandas-dev#22367 * Fixed Series[sparse].to_sparse Closes pandas-dev#22389 Closes pandas-dev#21978 Closes pandas-dev#19506 Closes pandas-dev#22835
Code Sample, a copy-pastable example if possible
Problem description
This to me smells like a problem with SparseArray sending over a sparse representation to take_1d in the C code. I would expect these values to be the same.
Expected Output
I would expect them to be the same.
Output of
pd.show_versions()
pandas: 0.23.0.dev0+205.gbe0928903
pytest: 3.3.1
pip: 9.0.1
setuptools: 28.8.0
Cython: 0.27.3
numpy: 1.13.1
scipy: 0.19.1
pyarrow: 0.8.0
xarray: 0.10.0
IPython: 6.1.0
sphinx: 1.6.5
patsy: None
dateutil: 2.6.1
pytz: 2017.2
blosc: 1.5.1
bottleneck: 1.2.1
tables: 3.4.2
numexpr: 2.6.4
feather: 0.4.0
matplotlib: 2.0.2
openpyxl: 2.4.9
xlrd: 1.1.0
xlwt: 1.3.0
xlsxwriter: 1.0.2
lxml: 4.1.1
bs4: 4.6.0
html5lib: 1.0b10
sqlalchemy: 1.1.15
pymysql: 0.7.11.None
psycopg2: None
jinja2: 2.9.6
s3fs: 0.1.2
fastparquet: 0.1.3
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: