BUG: Categorical comparison with unordered
State: closed

Fixes categorical comparison operations improperly considering
ordering when two unordered categoricals are compared.

Closes #16014

Labels:
name: Categorical
description: Categorical Data Type

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16339?src=pr&el=h1) Report
> Merging [#16339](https://codecov.io/gh/pandas-dev/pandas/pull/16339?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/50e95e01066c9dc60897f2f97cf9006275b3b6b9?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/16339/graphs/tree.svg?width=650&height=150&src=pr&token=eZ4WkYLtcO)](https://codecov.io/gh/pandas-dev/pandas/pull/16339?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #16339      +/-   ##
==========================================
- Coverage   90.36%   90.34%   -0.02%     
==========================================
  Files         161      161              
  Lines       50897    50905       +8     
==========================================
- Hits        45993    45992       -1     
- Misses       4904     4913       +9
```

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

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16339?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/categorical.py](https://codecov.io/gh/pandas-dev/pandas/pull/16339?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY2F0ZWdvcmljYWwucHk=) | `95.9% <100%> (+0.04%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/16339?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/16339?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.59% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16339?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/16339?src=pr&el=footer). Last update [50e95e0...2d47107](https://codecov.io/gh/pandas-dev/pandas/pull/16339?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/16339?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`master@539de79`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff            @@
##             master   #16339   +/-   ##
=========================================
  Coverage          ?    90.4%           
=========================================
  Files             ?      161           
  Lines             ?    50975           
  Branches          ?        0           
=========================================
  Hits              ?    46086           
  Misses            ?     4889           
  Partials          ?        0
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.18% <100%> (?)` | |
| #single | `40.19% <0%> (?)` | |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16339?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/categorical.py](https://codecov.io/gh/pandas-dev/pandas/pull/16339?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY2F0ZWdvcmljYWwucHk=) | `95.91% <100%> (ø)` | |

------

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