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: SparseSeries/DataFrame non-float dtypes repr #13110

Closed
sinhrks opened this issue May 7, 2016 · 0 comments · Fixed by #13849
Closed

BUG: SparseSeries/DataFrame non-float dtypes repr #13110

sinhrks opened this issue May 7, 2016 · 0 comments · Fixed by #13849
Labels
Bug Output-Formatting __repr__ of pandas objects, to_string Sparse Sparse Data Type
Milestone

Comments

@sinhrks
Copy link
Member

sinhrks commented May 7, 2016

Currently sparse don't actually support dtype other than float. These must be fixed with #667

Code Sample, a copy-pastable example if possible

1. bool dtype with fill_value raises IndexError
pd.SparseSeries([True, False, True, False, True], fill_value=False)
# IndexError: index out of bounds
2. truncated/DataFrame output coerces to float
pd.set_option('display.max_rows', 3)
pd.SparseSeries([True, False, True, False, True])
#0    1.0
#     ... 
#4    1.0
# dtype: float64
# BlockIndex
# Block locations: array([0], dtype=int32)
# Block lengths: array([5], dtype=int32)

pd.SparseDataFrame({'A': [True, False, True, False, True]})
#      A
#0  1.0
#1  0.0
#2  1.0
#3  0.0
#4  1.0

output of pd.show_versions()

on current master

@sinhrks sinhrks added Bug Output-Formatting __repr__ of pandas objects, to_string Sparse Sparse Data Type labels May 7, 2016
@sinhrks sinhrks added this to the 0.18.2 milestone May 7, 2016
@kawochen kawochen mentioned this issue May 7, 2016
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Output-Formatting __repr__ of pandas objects, to_string Sparse Sparse Data Type
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant