Skip to content
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

BUG: repr SparseDataFrame after setting a value #15489

Closed
wants to merge 1 commit into from

Conversation

kernc
Copy link
Contributor

@kernc kernc commented Feb 23, 2017

@codecov-io
Copy link

codecov-io commented Feb 23, 2017

Codecov Report

Merging #15489 into master will decrease coverage by -0.01%.
The diff coverage is n/a.

@@            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
Impacted Files Coverage Δ
pandas/formats/format.py 95.31% <ø> (-0.01%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d80275d...2dc145c. Read the comment docs.

@kernc kernc force-pushed the sdf-repr branch 2 times, most recently from fce521a to 23e5f38 Compare February 24, 2017 10:38
def test_sparse_repr_after_set(self):
# GH 15488
sdf = pd.SparseDataFrame(index=[0, 1], columns=[0, 1])

Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Updated.

try:
repr(sdf)
finally:
pd.core.config.set_option('mode.chained_assignment', old_opt)
Copy link
Contributor

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

@jreback jreback added Indexing Related to indexing on series/frames, not to indexes themselves Sparse Sparse Data Type labels Feb 24, 2017
@jreback jreback added this to the 0.20.0 milestone Feb 24, 2017
@jreback
Copy link
Contributor

jreback commented Feb 24, 2017

ok, lgtm. ping on green.

@kernc
Copy link
Contributor Author

kernc commented Mar 7, 2017

It's green.

@jreback jreback closed this in 38a34be Mar 7, 2017
@jreback
Copy link
Contributor

jreback commented Mar 7, 2017

thanks @kernc

keep em coming!

AnkurDedania pushed a commit to AnkurDedania/pandas that referenced this pull request Mar 21, 2017
closes pandas-dev#15488

Author: Kernc <kerncece@gmail.com>

Closes pandas-dev#15489 from kernc/sdf-repr and squashes the following commits:

2dc145c [Kernc] BUG: repr SparseDataFrame after setting a value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Indexing Related to indexing on series/frames, not to indexes themselves Sparse Sparse Data Type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repr-ing SparseDataFrame after setting a value
3 participants