-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
Implement DataFrame.__array_ufunc__ #23743
Labels
Comments
I think it's not that ufuncs cause
|
See #23744 (comment) for an answer. |
4 tasks
jreback
added a commit
to jreback/pandas
that referenced
this issue
May 29, 2019
preserve dtypes when applying a ufunc to a sparse dtype closes pandas-dev#18502 closes pandas-dev#23743
jreback
added a commit
to jreback/pandas
that referenced
this issue
May 29, 2019
preserve dtypes when applying a ufunc to a sparse dtype closes pandas-dev#18502 closes pandas-dev#23743
jreback
added a commit
to jreback/pandas
that referenced
this issue
May 29, 2019
preserve dtypes when applying a ufunc to a sparse dtype closes pandas-dev#18502 closes pandas-dev#23743
jreback
added a commit
to jreback/pandas
that referenced
this issue
May 30, 2019
preserve dtypes when applying a ufunc to a sparse dtype closes pandas-dev#18502 closes pandas-dev#23743
jreback
added a commit
to jreback/pandas
that referenced
this issue
Jun 2, 2019
preserve dtypes when applying a ufunc to a sparse dtype closes pandas-dev#18502 closes pandas-dev#23743
jreback
added a commit
to jreback/pandas
that referenced
this issue
Jun 8, 2019
preserve dtypes when applying a ufunc to a sparse dtype closes pandas-dev#18502 closes pandas-dev#23743
jreback
added a commit
to jreback/pandas
that referenced
this issue
Jun 9, 2019
preserve dtypes when applying a ufunc to a sparse dtype closes pandas-dev#18502 closes pandas-dev#23743
jreback
added a commit
to jreback/pandas
that referenced
this issue
Jun 21, 2019
preserve dtypes when applying a ufunc to a sparse dtype closes pandas-dev#18502 closes pandas-dev#23743
TomAugspurger
changed the title
Applying ufuncs on DataFrame with Sparse data looses sparse dtype
Implement DataFrame.__array_ufunc__
Sep 17, 2019
This was referenced Oct 5, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Applying a ufunc on a
DataFrame
with sparse columns does not retain its sparse dtype:Although
SparseDataFrame
returns the correct thing here, I am not sure it actually works as desired, as I am not sure it prevents materializing the full data (which in principle should be possible to not do)edit from Tom
Implementing
DataFrame.__array_ufunc__
is probably the best way to do this.The semantics will be similar to
Series.array_ufunc,
but applied blockwise.
inputs
will first be aligned.There are some additional complicates with dimensionality, shapes, broadcasting... But the basic idea of using
__array_ufunc__
blockwise so that the underlying array's__array_ufunc__
is called makes sense.The text was updated successfully, but these errors were encountered: