Bug issue 16819 Index.get_indexer_not_unique inconsistent return types vs get_indexer
State: closed

closes #16819
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.)
whatsnew entry


Labels:
name: Bug
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: API Design

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

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

```diff
@@            Coverage Diff             @@
##           master   #16826      +/-   ##
==========================================
+ Coverage   90.96%   90.96%   +<.01%     
==========================================
  Files         161      161              
  Lines       49274    49273       -1     
==========================================
  Hits        44820    44820              
+ Misses       4454     4453       -1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.73% <100%> (ø)` | :arrow_up: |
| #single | `40.17% <33.33%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16826?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/groupby.py](https://codecov.io/gh/pandas-dev/pandas/pull/16826?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS5weQ==) | `92.06% <100%> (ø)` | :arrow_up: |
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/16826?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `95.8% <100%> (-0.01%)` | :arrow_down: |
| [pandas/core/indexes/category.py](https://codecov.io/gh/pandas-dev/pandas/pull/16826?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9jYXRlZ29yeS5weQ==) | `98.49% <0%> (+0.3%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16826?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/16826?src=pr&el=footer). Last update [15db50b...e1b85cb](https://codecov.io/gh/pandas-dev/pandas/pull/16826?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/16826?src=pr&el=h1) Report
> Merging [#16826](https://codecov.io/gh/pandas-dev/pandas/pull/16826?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/15db50bbdbce91608c9c4c0bc1398c41a619a9be?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #16826      +/-   ##
==========================================
+ Coverage   90.96%   90.96%   +<.01%     
==========================================
  Files         161      161              
  Lines       49274    49274              
==========================================
+ Hits        44820    44821       +1     
+ Misses       4454     4453       -1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.73% <100%> (ø)` | :arrow_up: |
| #single | `40.17% <25%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16826?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/16826?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `95.8% <100%> (-0.01%)` | :arrow_down: |
| [pandas/core/groupby.py](https://codecov.io/gh/pandas-dev/pandas/pull/16826?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS5weQ==) | `92.07% <100%> (ø)` | :arrow_up: |
| [pandas/core/indexes/category.py](https://codecov.io/gh/pandas-dev/pandas/pull/16826?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9jYXRlZ29yeS5weQ==) | `98.49% <0%> (+0.3%)` | :arrow_up: |

------

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

thanks!