Repr-ing SparseDataFrame after setting a value #15488

Closed
kernc opened this Issue Feb 23, 2017 · 1 comment

Comments

Projects
None yet
2 participants
Contributor

kernc commented Feb 23, 2017

Code Sample, a copy-pastable example if possible

>>> sdf = pd.SparseDataFrame(index=[0, 1], columns=[0, 1])
>>> sdf[0][0] = 1  # This warns; ignore
>>> sdf
AttributeError: 'NoneType' object has no attribute 'type'

Problem description

After some value is set on a copy of a SparseSeries, the enclosing SparseDataFrame can no longer be printed (raises AttributeError).

Expected Output

>>> sdf
    0   1
0 NaN NaN
1 NaN NaN

Output of pd.show_versions()

0.19.0+479.git

kernc referenced this issue Feb 23, 2017

Closed

BUG: repr SparseDataFrame after setting a value #15489

4 of 4 tasks complete
Contributor

jreback commented Feb 23, 2017

These are not implemented, so not sure that

In [3]: sdf.loc[0,0] = 1
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)

this should even work

jreback added this to the 0.20.0 milestone Feb 24, 2017

jreback added the Bug label Feb 24, 2017

jreback closed this in 38a34be Mar 7, 2017

@AnkurDedania AnkurDedania added a commit to AnkurDedania/pandas that referenced this issue Mar 21, 2017

@kernc @AnkurDedania kernc + AnkurDedania BUG: repr SparseDataFrame after setting a value
closes #15488

Author: Kernc <kerncece@gmail.com>

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

2dc145c [Kernc] BUG: repr SparseDataFrame after setting a value
ea5d7ad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment