COMPAT: rename isnull -> isna, notnull -> notna
State: closed

existing isnull, notnull remain user facing, will show DeprecationWarning

closes #15001



Labels:
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
name: API Design
name: Compat
description: pandas objects compatability with Numpy or Python functions

Comments:
we *might* want to put in place a ``DeprecationWarning`` for this.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16972?src=pr&el=h1) Report
> Merging [#16972](https://codecov.io/gh/pandas-dev/pandas/pull/16972?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/395f712133a4f6003ec8029458ade7ab423096d0?src=pr&el=desc) will **decrease** coverage by `0.04%`.
> The diff coverage is `92.22%`.

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

```diff
@@            Coverage Diff             @@
##           master   #16972      +/-   ##
==========================================
- Coverage   91.05%      91%   -0.05%     
==========================================
  Files         161      161              
  Lines       49363    49381      +18     
==========================================
- Hits        44948    44941       -7     
- Misses       4415     4440      +25
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.78% <90.83%> (-0.04%)` | :arrow_down: |
| #single | `40.29% <42.5%> (-0.03%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16972?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/json/json.py](https://codecov.io/gh/pandas-dev/pandas/pull/16972?src=pr&el=tree#diff-cGFuZGFzL2lvL2pzb24vanNvbi5weQ==) | `100% <ø> (ø)` | :arrow_up: |
| [pandas/io/formats/style.py](https://codecov.io/gh/pandas-dev/pandas/pull/16972?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvc3R5bGUucHk=) | `100% <ø> (ø)` | :arrow_up: |
| [pandas/core/sorting.py](https://codecov.io/gh/pandas-dev/pandas/pull/16972?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc29ydGluZy5weQ==) | `98.19% <100%> (ø)` | :arrow_up: |
| [pandas/core/util/hashing.py](https://codecov.io/gh/pandas-dev/pandas/pull/16972?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvdXRpbC9oYXNoaW5nLnB5) | `98.34% <100%> (ø)` | :arrow_up: |
| [pandas/core/reshape/pivot.py](https://codecov.io/gh/pandas-dev/pandas/pull/16972?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9waXZvdC5weQ==) | `95.18% <100%> (ø)` | :arrow_up: |
| [pandas/io/stata.py](https://codecov.io/gh/pandas-dev/pandas/pull/16972?src=pr&el=tree#diff-cGFuZGFzL2lvL3N0YXRhLnB5) | `93.66% <100%> (ø)` | :arrow_up: |
| [pandas/util/\_decorators.py](https://codecov.io/gh/pandas-dev/pandas/pull/16972?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvX2RlY29yYXRvcnMucHk=) | `65.65% <100%> (+0.35%)` | :arrow_up: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/16972?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.33% <100%> (ø)` | :arrow_up: |
| [pandas/plotting/\_core.py](https://codecov.io/gh/pandas-dev/pandas/pull/16972?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb3JlLnB5) | `82.8% <100%> (ø)` | :arrow_up: |
| [pandas/core/config\_init.py](https://codecov.io/gh/pandas-dev/pandas/pull/16972?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29uZmlnX2luaXQucHk=) | `95.9% <100%> (+0.03%)` | :arrow_up: |
| ... and [41 more](https://codecov.io/gh/pandas-dev/pandas/pull/16972?src=pr&el=tree-more) | |

------

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

> existing isnull, notnull remain user facing

What do you mean by this?

> we might want to put in place a DeprecationWarning for this.

I'm in favor of this.  I don't see the harm given that we've had surprises before. 😢 
see comment: https://github.com/pandas-dev/pandas/issues/15001#issuecomment-269478281 about deprecating ``isnull/notnull``.

I think it makes sense to issue a ``DeprecationWarning`` here, so not super visible but gives us flexibilty about when to change this to ``FutureWarning``; so this would be similar to how we are handling ``Panel`` and ``.ix``. ``DeprecationWarning`` now, ``FutureWarning`` in 1.x (still TBD).
> I think it makes sense to issue a DeprecationWarning here, so not super visible but gives us flexibilty about when to change this to FutureWarning

Gotcha.  Makes sense.
@jreback : Are there tests for this deprecation? (diff takes forever to load :cry: )
not yet
any comments

@TomAugspurger @wesm 
I see my +1 on adding isna/notna from December 28, but I'm feeling less keen on adding a deprecation warning for such an old and commonly used function. Would it be acceptable to leave it as an alias to isna/notna, respectively?
no biggie to remove the DeprecationWarning. only issue remaining is do I mention this in api.rst *at all* (its already changed in the docs proper).?
Seems like a good idea since people may Google search for it and find old documentation pages otherwise
fixed in https://github.com/pandas-dev/pandas/commit/465c59f964c8d71d8bedd16fcaa00e4328177cb1
Thanks!
This merge causes a failure in `xarray`s `Dataset.notnull()`, see https://github.com/pydata/xarray/issues/1663.
Xarray was implicitly assuming that the pandas `isnull()` function satisfied `isnull.__name__ == 'isnull'. That's not really something that should be considered guaranteed as part of the public API, so I think this one is on us.