SparseSeries accepts scipy.sparse.spmatrix in constructor
State: closed

 - [X] closes #15634
 - [X] tests added / passed
 - [X] passes ``git diff upstream/master --name-only -- '*.py' | flake8 --diff``
 - [X] whatsnew entry


Labels:
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: Sparse
description: Sparse Data Type

Comments:
> this is probably going to be tricky to make work.

Why do you think so? It does seem to work for the moment. 😃 
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=h1) Report
> Merging [#16617](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/10c17d4896799cf1e8f313025d1071e5abbb65f9?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `84.84%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/16617/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #16617      +/-   ##
==========================================
- Coverage   90.96%   90.95%   -0.01%     
==========================================
  Files         161      161              
  Lines       49263    49287      +24     
==========================================
+ Hits        44810    44827      +17     
- Misses       4453     4460       +7
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.71% <84.84%> (-0.01%)` | :arrow_down: |
| #single | `40.22% <30.3%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/sparse/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3BhcnNlL3Nlcmllcy5weQ==) | `95.1% <100%> (+0.03%)` | :arrow_up: |
| [pandas/core/indexing.py](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhpbmcucHk=) | `94.01% <100%> (ø)` | :arrow_up: |
| [pandas/core/sparse/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3BhcnNlL2ZyYW1lLnB5) | `94.77% <100%> (+0.51%)` | :arrow_up: |
| [pandas/core/sparse/array.py](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3BhcnNlL2FycmF5LnB5) | `91.62% <100%> (+0.16%)` | :arrow_up: |
| [pandas/core/internals.py](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzLnB5) | `93.56% <54.54%> (+0.13%)` | :arrow_up: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `63.23% <0%> (-1.82%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=footer). Last update [10c17d4...293bb47](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=h1) Report
> Merging [#16617](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/10c17d4896799cf1e8f313025d1071e5abbb65f9?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `85.71%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/16617/graphs/tree.svg?width=650&height=150&src=pr&token=eZ4WkYLtcO)](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #16617      +/-   ##
==========================================
- Coverage   90.96%   90.95%   -0.01%     
==========================================
  Files         161      161              
  Lines       49263    49287      +24     
==========================================
+ Hits        44810    44827      +17     
- Misses       4453     4460       +7
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.71% <85.71%> (-0.01%)` | :arrow_down: |
| #single | `40.22% <28.57%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/sparse/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3BhcnNlL2ZyYW1lLnB5) | `94.77% <100%> (+0.51%)` | :arrow_up: |
| [pandas/core/sparse/array.py](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3BhcnNlL2FycmF5LnB5) | `91.62% <100%> (+0.16%)` | :arrow_up: |
| [pandas/core/sparse/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3BhcnNlL3Nlcmllcy5weQ==) | `95.1% <100%> (+0.03%)` | :arrow_up: |
| [pandas/core/indexing.py](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhpbmcucHk=) | `94.01% <100%> (ø)` | :arrow_up: |
| [pandas/core/internals.py](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzLnB5) | `93.56% <61.53%> (+0.13%)` | :arrow_up: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `63.23% <0%> (-1.82%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=footer). Last update [10c17d4...ef03e73](https://codecov.io/gh/pandas-dev/pandas/pull/16617?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

can you rebase / update
@kernc if you have time can you rebase / update
For some reason (probably `assert_raises` in `test_setitem_spmatrix()`), I had a while ago decided to first implement `setitem` on `SparseSeries` that I have 80% done waiting in a feature branch somewhere. If you insist, I can push this first, however.
oh we can do the other first 
was just looking thru open prs 

what was that number?
Right, it's https://github.com/pandas-dev/pandas/pull/17785.
closing as stale. if you want to continue working, pls ping.