BUG: Series.asof fails for all NaN Series (GH15713)
State: closed

 - [x] closes bug #15713
 - [x] 1 tests added / passed
 - [x] passes ``git diff upstream/master | flake8 --diff``
 - [x] whatsnew entry

Added the test if the series is all nans
Added the code that check if that's the case: if yes, return the expected output
As this is my first contribution, please comment if I did it right :)
Thanks!


Labels:
name: Bug
name: Datetime
description: Datetime data dtype
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

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

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

```diff
@@            Coverage Diff             @@
##           master   #15758      +/-   ##
==========================================
- Coverage   91.01%   91.01%   -0.01%     
==========================================
  Files         143      143              
  Lines       49395    49379      -16     
==========================================
- Hits        44959    44940      -19     
- Misses       4436     4439       +3
```


| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/15758?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/15758?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `96.25% <100%> (+0.01%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/15758?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/tseries/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/15758?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvY29tbW9uLnB5) | `88.09% <0%> (-1.07%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/15758?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.86% <0%> (-0.1%)` | :arrow_down: |
| [pandas/core/algorithms.py](https://codecov.io/gh/pandas-dev/pandas/pull/15758?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYWxnb3JpdGhtcy5weQ==) | `94.41% <0%> (-0.1%)` | :arrow_down: |
| [pandas/io/stata.py](https://codecov.io/gh/pandas-dev/pandas/pull/15758?src=pr&el=tree#diff-cGFuZGFzL2lvL3N0YXRhLnB5) | `93.47% <0%> (-0.05%)` | :arrow_down: |
| [pandas/core/strings.py](https://codecov.io/gh/pandas-dev/pandas/pull/15758?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3RyaW5ncy5weQ==) | `98.48% <0%> (-0.02%)` | :arrow_down: |
| [pandas/indexes/numeric.py](https://codecov.io/gh/pandas-dev/pandas/pull/15758?src=pr&el=tree#diff-cGFuZGFzL2luZGV4ZXMvbnVtZXJpYy5weQ==) | `97.1% <0%> (-0.02%)` | :arrow_down: |
| [pandas/indexes/multi.py](https://codecov.io/gh/pandas-dev/pandas/pull/15758?src=pr&el=tree#diff-cGFuZGFzL2luZGV4ZXMvbXVsdGkucHk=) | `96.59% <0%> (ø)` | :arrow_up: |
| [pandas/core/categorical.py](https://codecov.io/gh/pandas-dev/pandas/pull/15758?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY2F0ZWdvcmljYWwucHk=) | `96.89% <0%> (ø)` | :arrow_up: |
| ... and [11 more](https://codecov.io/gh/pandas-dev/pandas/pull/15758?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15758?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/15758?src=pr&el=footer). Last update [92239f5...0765108](https://codecov.io/gh/pandas-dev/pandas/pull/15758?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
somewhat separate. but do we have a guarantee on a not-found indexer? 

@chris-b1 
```
In [28]: Series([np.nan, 1, 2], index=[2, 3, 4]).asof([0])
Out[28]: 
0   NaN
dtype: float64
```
lgtm. 

@chris-b1 if you can give a quick look (don't merge yet, going to merge a couple of things at once later)
thanks @ucals ping on green.
All green. @jreback , @jorisvandenbossche , thanks a lot! You guys are great. This was my first ever contribution to an open source project, and you guys gave me the right direction - feels very good to contribute and learn! I'll try to tackle an intermediate bug now
thanks!