BUG: Series.isin fails or categoricals
State: closed

 - closes #16639 
 - [1 ] tests added / passed
 - ] passes ``git diff upstream/master --name-only -- '*.py' | flake8 --diff`` (On Windows, ``git diff upstream/master -u -- "*.py" | flake8 --diff`` might work as an alternative.)
 - [check ] whatsnew entry


Labels:
name: Bug
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Categorical
description: Categorical Data Type

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

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

```diff
@@            Coverage Diff             @@
##           master   #16858      +/-   ##
==========================================
- Coverage   90.98%   90.96%   -0.02%     
==========================================
  Files         161      161              
  Lines       49300    49300              
==========================================
- Hits        44857    44848       -9     
- Misses       4443     4452       +9
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.74% <100%> (ø)` | :arrow_up: |
| #single | `40.18% <100%> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16858?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/algorithms.py](https://codecov.io/gh/pandas-dev/pandas/pull/16858?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYWxnb3JpdGhtcy5weQ==) | `94.41% <100%> (ø)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/16858?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/16858?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/16858?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/16858?src=pr&el=footer). Last update [18f929f...503bc2b](https://codecov.io/gh/pandas-dev/pandas/pull/16858?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/16858?src=pr&el=h1) Report
> Merging [#16858](https://codecov.io/gh/pandas-dev/pandas/pull/16858?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/18f929fa83d2d1f335f8ccf325c05a6ce314b94d?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #16858      +/-   ##
==========================================
- Coverage   90.98%   90.96%   -0.02%     
==========================================
  Files         161      161              
  Lines       49300    49300              
==========================================
- Hits        44857    44848       -9     
- Misses       4443     4452       +9
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.74% <100%> (ø)` | :arrow_up: |
| #single | `40.18% <100%> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16858?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/algorithms.py](https://codecov.io/gh/pandas-dev/pandas/pull/16858?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYWxnb3JpdGhtcy5weQ==) | `94.41% <100%> (ø)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/16858?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/16858?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/16858?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/16858?src=pr&el=footer). Last update [18f929f...8e19c98](https://codecov.io/gh/pandas-dev/pandas/pull/16858?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

I"m not sure I understand the Travis CI build failure. Is there something I need to do/change
linting is failing

git diff upstream/master --name-only -- '*.py' | flake8 --diff 
Hm... I must be missing something, on my local copy I get 
``git diff upstream/master --name-only -- '*.py' | flake8 --diff``
with no output, which i take to mean that all is well. 
Also 
`` $ git status
On branch bug16639-fix
nothing to commit, working directory clean``

Do I need to make another pull request for my minor fixes to the review

> Do I need to make another pull request for my minor fixes to the review

NO

simply update and push
From my local 
``$ git pull origin bug16639-fix 
From http://github.com/aviolov/pandas
 * branch            bug16639-fix -> FETCH_HEAD
Already up-to-date.
 $ git push origin bug16639-fix 
Everything up-to-date
`` 

Do I need to apply the 'force' flag?
`` git push -f ``


you don't need to force push unless the existing fails. but you are failing linting.

http://pandas.pydata.org/pandas-docs/stable/contributing.html
I got it, I needed to run the 'comprehensive' flakes command

``` 
git diff master --name-only -- '*.py' | grep 'pandas/' | xargs -r flake8
```

Ok, hopefully fixed those
thanks!
anytime, thanks for reviewing