Move series.remove_na to core.dtypes.missing.remove_na_arraylike
State: closed

See discussion on #16931.


Labels:
name: Refactor
description: Internal refactoring of code

Comments:
Hello @jbrockmendel! Thanks for updating the PR.



 - In the file [`pandas/core/series.py`](https://github.com/pandas-dev/pandas/blob/18a561090a866987bf265d0b9b422c9dcb536388/pandas/core/series.py), following are the PEP8 issues :

> [Line 579:9](https://github.com/pandas-dev/pandas/blob/18a561090a866987bf265d0b9b422c9dcb536388/pandas/core/series.py#L579): [E722](https://duckduckgo.com/?q=pep8%20E722) do not use bare except'
> [Line 657:17](https://github.com/pandas-dev/pandas/blob/18a561090a866987bf265d0b9b422c9dcb536388/pandas/core/series.py#L657): [E722](https://duckduckgo.com/?q=pep8%20E722) do not use bare except'
> [Line 800:17](https://github.com/pandas-dev/pandas/blob/18a561090a866987bf265d0b9b422c9dcb536388/pandas/core/series.py#L800): [E722](https://duckduckgo.com/?q=pep8%20E722) do not use bare except'
> [Line 2158:13](https://github.com/pandas-dev/pandas/blob/18a561090a866987bf265d0b9b422c9dcb536388/pandas/core/series.py#L2158): [E731](https://duckduckgo.com/?q=pep8%20E731) do not assign a lambda expression, use a def
> [Line 2174:17](https://github.com/pandas-dev/pandas/blob/18a561090a866987bf265d0b9b422c9dcb536388/pandas/core/series.py#L2174): [E731](https://duckduckgo.com/?q=pep8%20E731) do not assign a lambda expression, use a def
> [Line 2370:13](https://github.com/pandas-dev/pandas/blob/18a561090a866987bf265d0b9b422c9dcb536388/pandas/core/series.py#L2370): [E731](https://duckduckgo.com/?q=pep8%20E731) do not assign a lambda expression, use a def
> [Line 2764:5](https://github.com/pandas-dev/pandas/blob/18a561090a866987bf265d0b9b422c9dcb536388/pandas/core/series.py#L2764): [E731](https://duckduckgo.com/?q=pep8%20E731) do not assign a lambda expression, use a def



 - In the file [`pandas/tests/test_panel.py`](https://github.com/pandas-dev/pandas/blob/18a561090a866987bf265d0b9b422c9dcb536388/pandas/tests/test_panel.py), following are the PEP8 issues :

> [Line 82:9](https://github.com/pandas-dev/pandas/blob/18a561090a866987bf265d0b9b422c9dcb536388/pandas/tests/test_panel.py#L82): [E731](https://duckduckgo.com/?q=pep8%20E731) do not assign a lambda expression, use a def
> [Line 346:17](https://github.com/pandas-dev/pandas/blob/18a561090a866987bf265d0b9b422c9dcb536388/pandas/tests/test_panel.py#L346): [E722](https://duckduckgo.com/?q=pep8%20E722) do not use bare except'
> [Line 352:17](https://github.com/pandas-dev/pandas/blob/18a561090a866987bf265d0b9b422c9dcb536388/pandas/tests/test_panel.py#L352): [E722](https://duckduckgo.com/?q=pep8%20E722) do not use bare except'
> [Line 1347:13](https://github.com/pandas-dev/pandas/blob/18a561090a866987bf265d0b9b422c9dcb536388/pandas/tests/test_panel.py#L1347): [E731](https://duckduckgo.com/?q=pep8%20E731) do not assign a lambda expression, use a def
> [Line 2529:21](https://github.com/pandas-dev/pandas/blob/18a561090a866987bf265d0b9b422c9dcb536388/pandas/tests/test_panel.py#L2529): [E731](https://duckduckgo.com/?q=pep8%20E731) do not assign a lambda expression, use a def

 - In the file [`pandas/tests/test_panel4d.py`](https://github.com/pandas-dev/pandas/blob/18a561090a866987bf265d0b9b422c9dcb536388/pandas/tests/test_panel4d.py), following are the PEP8 issues :

> [Line 36:9](https://github.com/pandas-dev/pandas/blob/18a561090a866987bf265d0b9b422c9dcb536388/pandas/tests/test_panel4d.py#L36): [E731](https://duckduckgo.com/?q=pep8%20E731) do not assign a lambda expression, use a def



##### Comment last updated on July 15, 2017 at 17:38 Hours UTC
ignore the pep8speaks for now
we r testing it out
@jbrockmendel : Just a minor style error, but otherwise, everything looks green. 👍 
What's the style error?
The style error can be found <a href="https://travis-ci.org/pandas-dev/pandas/jobs/253806510#L1779">here</a>.  Address that, and then all builds will pass.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=h1) Report
> Merging [#16935](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/6858d0f6caa60c98acc4b6c3eaa6cd0309aedca6?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `90%`.

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

```diff
@@            Coverage Diff             @@
##           master   #16935      +/-   ##
==========================================
- Coverage   90.99%   90.98%   -0.02%     
==========================================
  Files         161      161              
  Lines       49306    49306              
==========================================
- Hits        44868    44859       -9     
- Misses       4438     4447       +9
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.75% <90%> (ø)` | :arrow_up: |
| #single | `40.19% <40%> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/dtypes/missing.py](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL21pc3NpbmcucHk=) | `87.03% <100%> (+0.16%)` | :arrow_up: |
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `94.89% <100%> (-0.01%)` | :arrow_down: |
| [pandas/plotting/\_core.py](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb3JlLnB5) | `82.52% <83.33%> (ø)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.71% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16935?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/16935?src=pr&el=footer). Last update [6858d0f...18a5610](https://codecov.io/gh/pandas-dev/pandas/pull/16935?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/16935?src=pr&el=h1) Report
> Merging [#16935](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/6858d0f6caa60c98acc4b6c3eaa6cd0309aedca6?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/16935/graphs/tree.svg?width=650&height=150&src=pr&token=eZ4WkYLtcO)](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #16935      +/-   ##
==========================================
- Coverage   90.99%   90.96%   -0.03%     
==========================================
  Files         161      161              
  Lines       49306    49288      -18     
==========================================
- Hits        44868    44837      -31     
- Misses       4438     4451      +13
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.74% <90%> (-0.02%)` | :arrow_down: |
| #single | `40.2% <40%> (-0.06%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `94.89% <100%> (-0.01%)` | :arrow_down: |
| [pandas/core/dtypes/missing.py](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL21pc3NpbmcucHk=) | `87.03% <100%> (+0.16%)` | :arrow_up: |
| [pandas/plotting/\_core.py](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb3JlLnB5) | `82.52% <83.33%> (ø)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `63.23% <0%> (-1.82%)` | :arrow_down: |
| [pandas/compat/\_\_init\_\_.py](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=tree#diff-cGFuZGFzL2NvbXBhdC9fX2luaXRfXy5weQ==) | `60.67% <0%> (-1.55%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.76% <0%> (-0.05%)` | :arrow_down: |
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `92.29% <0%> (ø)` | :arrow_up: |
| [pandas/core/panel.py](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcGFuZWwucHk=) | `96.94% <0%> (ø)` | :arrow_up: |
| [pandas/core/indexes/multi.py](https://codecov.io/gh/pandas-dev/pandas/pull/16935?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9tdWx0aS5weQ==) | `96.91% <0%> (+0.24%)` | :arrow_up: |

------

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

lgtm

ping on green
Thanks @jbrockmendel !