Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Deprecate SparseDataFrame and SparseSeries #26137
Deprecate SparseDataFrame and SparseSeries #26137
Changes from 22 commits
d518404
c32e5ff
836d19b
c0d6cf2
8f06d88
380c7c0
21569e2
6a81837
12a8329
01c7710
e9b9b29
b295ce1
ccf71db
7e6fbd6
865f1aa
9915c48
30f3670
b043243
b2aef95
706c5dc
13d30d2
c5fa3fb
101c425
b76745f
f153400
0c49ddc
1903f67
0b03ac2
12d8d83
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a doc-string here (types too if you can!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I'm not really sure on two things
'scipy.sparse.coo.coo_matrix'
, but we can't import sparse.Union[Series, SparseSeries]
but importing SparseSeries would cause a circular importso I left types off for those.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you? Are these types actually checked in our CI? I'd rather not introduce invalid types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes they should be
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why exactly do you need sparse_series flag? why can't we just do the astype after calling this routine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is called from both Series.sparse and SparseSeries.
Previously, this went coo_matrix -> SparseSeries -> Series[sparse], which caused an undesired warning for
Series.sparse.from_coo()
. Once SparseSeries is gone we can remove the keyword.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok can you add a todo about this then, this is not obvious at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you don't need these as a prior PR added this to setup.cfg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The setup.cfg has an
error:::
config to elevate unhandled warnings to errors. We still need these otherwise the tests would fail.We have a single test asserting that
SparseSeries.__init__
warns, and explicitly ignore the warnings elsewhere.