BUG: don't assume series is length > 0
State: closed

- [x] closes #19368
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Bug
name: Sparse
description: Sparse Data Type

Comments:
Also looks like I have a test failure I'll look into
I think I figured out the problem. One of the memory_usage defs needed to pass in only sp_values.

We'll see how the tests chooch.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19438?src=pr&el=h1) Report
> Merging [#19438](https://codecov.io/gh/pandas-dev/pandas/pull/19438?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/de39a1572fcf82071f3c0b5f22be1611222bdf41?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `90%`.

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

```diff
@@            Coverage Diff             @@
##           master   #19438      +/-   ##
==========================================
- Coverage   91.62%   91.59%   -0.03%     
==========================================
  Files         150      150              
  Lines       48714    48725      +11     
==========================================
- Hits        44633    44630       -3     
- Misses       4081     4095      +14
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.96% <90%> (-0.03%)` | :arrow_down: |
| #single | `41.75% <50%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/19438?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/19438/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYmFzZS5weQ==) | `96.76% <ø> (ø)` | :arrow_up: |
| [pandas/core/sparse/array.py](https://codecov.io/gh/pandas-dev/pandas/pull/19438/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3BhcnNlL2FycmF5LnB5) | `91.4% <90%> (-0.08%)` | :arrow_down: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/19438/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `65.22% <0%> (-1.74%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/19438/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `83.64% <0%> (-0.21%)` | :arrow_down: |
| [pandas/core/groupby.py](https://codecov.io/gh/pandas-dev/pandas/pull/19438/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS5weQ==) | `92.17% <0%> (+0.02%)` | :arrow_up: |
| [pandas/core/strings.py](https://codecov.io/gh/pandas-dev/pandas/pull/19438/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3RyaW5ncy5weQ==) | `98.31% <0%> (+0.14%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19438?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/19438?src=pr&el=footer). Last update [de39a15...f9433d8](https://codecov.io/gh/pandas-dev/pandas/pull/19438?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

ping this is green and I think I fixed everything pointed out.
thanks @hexgnu keep em coming!