Skip to content

Conversation

@TomAugspurger
Copy link
Contributor

Awaiting consensus on #23559, but I went ahead an implemented it.

Breaking API change for

In [1]: import pandas as pd

In [2]: df = pd.DataFrame({"A": pd.SparseSeries([1, 0])})

In [3]: type(df['A'])
Out[3]: pandas.core.sparse.series.SparseSeries

Now Out[3] is a Series.

closes #23559

Breaking API change for

```python
In [1]: import pandas as pd

In [2]: df = pd.DataFrame({"A": pd.SparseSeries([1, 0])})

In [3]: type(df['A'])
Out[3]: pandas.core.sparse.series.SparseSeries
```

Now Out[3] is a Series.

closes pandas-dev#23559
@TomAugspurger TomAugspurger added API Design Sparse Sparse Data Type labels Nov 8, 2018
@TomAugspurger TomAugspurger added this to the 0.24.0 milestone Nov 8, 2018
@pep8speaks
Copy link

Hello @TomAugspurger! Thanks for submitting the PR.

@codecov
Copy link

codecov bot commented Nov 8, 2018

Codecov Report

Merging #23561 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #23561      +/-   ##
==========================================
- Coverage   92.24%   92.24%   -0.01%     
==========================================
  Files         161      161              
  Lines       51224    51218       -6     
==========================================
- Hits        47254    47248       -6     
  Misses       3970     3970
Flag Coverage Δ
#multiple 90.63% <100%> (-0.01%) ⬇️
#single 42.27% <100%> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/core/dtypes/concat.py 96.26% <ø> (-0.09%) ⬇️
pandas/core/frame.py 97.03% <100%> (-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 8212001...17ab4f5. Read the comment docs.

@jreback
Copy link
Contributor

jreback commented Nov 8, 2018

lgtm.

@jreback jreback merged commit 43a558f into pandas-dev:master Nov 11, 2018
@jreback
Copy link
Contributor

jreback commented Nov 11, 2018

thanks @TomAugspurger this seems totally reasonable, esp if we are deprecating SparseSeries.

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

Labels

API Design Sparse Sparse Data Type

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DataFrame[sparse].__getitem__ should be Series, not SparseSeries

3 participants