-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: repr SparseDataFrame after setting a value #15489
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #15489 +/- ##
==========================================
- Coverage 90.36% 90.36% -0.01%
==========================================
Files 136 136
Lines 49553 49551 -2
==========================================
- Hits 44781 44779 -2
Misses 4772 4772
Continue to review full report at Codecov.
|
fce521a
to
23e5f38
Compare
pandas/tests/sparse/test_format.py
Outdated
def test_sparse_repr_after_set(self): | ||
# GH 15488 | ||
sdf = pd.SparseDataFrame(index=[0, 1], columns=[0, 1]) | ||
|
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.
use pd.option_context
as a context manager instead
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.
Thanks! Updated.
pandas/tests/sparse/test_format.py
Outdated
try: | ||
repr(sdf) | ||
finally: | ||
pd.core.config.set_option('mode.chained_assignment', old_opt) |
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.
also can you use assert_sp_frame_equal
and compare
ok, lgtm. ping on green. |
It's green. |
thanks @kernc keep em coming! |
closes pandas-dev#15488 Author: Kernc <[email protected]> Closes pandas-dev#15489 from kernc/sdf-repr and squashes the following commits: 2dc145c [Kernc] BUG: repr SparseDataFrame after setting a value
git diff upstream/master | flake8 --diff