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

Closed
sinhrks opened this Issue May 7, 2016 · 0 comments

Comments

Projects
None yet
1 participant
Member

sinhrks commented May 7, 2016 edited

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 added this to the 0.18.2 milestone May 7, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment