CLN: remove pandas.core.categorical
State: closed

xref #19269

https://github.com/pandas-dev/pandas/blob/de52d0b10c28318ae48390dbe7abcd1807a1154a/pandas/core/categorical.py#L7

Labels:
name: Clean

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

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

```diff
@@             Coverage Diff             @@
##           master   #25655       +/-   ##
===========================================
- Coverage   91.29%   41.74%   -49.56%     
===========================================
  Files         173      172        -1     
  Lines       52961    52957        -4     
===========================================
- Hits        48350    22106    -26244     
- Misses       4611    30851    +26240
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `?` | |
| #single | `41.74% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/25655?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/formats/latex.py](https://codecov.io/gh/pandas-dev/pandas/pull/25655/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvbGF0ZXgucHk=) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/io/sas/sas\_constants.py](https://codecov.io/gh/pandas-dev/pandas/pull/25655/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3Nhcy9zYXNfY29uc3RhbnRzLnB5) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/tseries/plotting.py](https://codecov.io/gh/pandas-dev/pandas/pull/25655/diff?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvcGxvdHRpbmcucHk=) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/tseries/converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/25655/diff?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvY29udmVydGVyLnB5) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/io/formats/html.py](https://codecov.io/gh/pandas-dev/pandas/pull/25655/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvaHRtbC5weQ==) | `0% <0%> (-99.36%)` | :arrow_down: |
| [pandas/core/groupby/categorical.py](https://codecov.io/gh/pandas-dev/pandas/pull/25655/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9jYXRlZ29yaWNhbC5weQ==) | `0% <0%> (-95.46%)` | :arrow_down: |
| [pandas/io/sas/sas7bdat.py](https://codecov.io/gh/pandas-dev/pandas/pull/25655/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3Nhcy9zYXM3YmRhdC5weQ==) | `0% <0%> (-91.17%)` | :arrow_down: |
| [pandas/io/sas/sas\_xport.py](https://codecov.io/gh/pandas-dev/pandas/pull/25655/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3Nhcy9zYXNfeHBvcnQucHk=) | `0% <0%> (-90.15%)` | :arrow_down: |
| [pandas/core/tools/numeric.py](https://codecov.io/gh/pandas-dev/pandas/pull/25655/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvdG9vbHMvbnVtZXJpYy5weQ==) | `10.44% <0%> (-89.56%)` | :arrow_down: |
| [pandas/io/json/normalize.py](https://codecov.io/gh/pandas-dev/pandas/pull/25655/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2pzb24vbm9ybWFsaXplLnB5) | `8.16% <0%> (-88.78%)` | :arrow_down: |
| ... and [129 more](https://codecov.io/gh/pandas-dev/pandas/pull/25655/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/25655?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/25655?src=pr&el=footer). Last update [de52d0b...924b60a](https://codecov.io/gh/pandas-dev/pandas/pull/25655?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/25655?src=pr&el=h1) Report
> Merging [#25655](https://codecov.io/gh/pandas-dev/pandas/pull/25655?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/de52d0b10c28318ae48390dbe7abcd1807a1154a?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #25655      +/-   ##
==========================================
- Coverage   91.29%   91.29%   -0.01%     
==========================================
  Files         173      172       -1     
  Lines       52961    52957       -4     
==========================================
- Hits        48350    48345       -5     
- Misses       4611     4612       +1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.86% <ø> (-0.01%)` | :arrow_down: |
| #single | `41.74% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/25655?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/25655/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `88.98% <0%> (-0.1%)` | :arrow_down: |

------

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

LGTM.  Did you grep for all the “remove after ...” comments?
a quick grep yields:

```
pandas/compat/pickle_compat.py:    # TODO: When FrozenNDArray is removed, add
pandas/core/arrays/datetimelike.py:        # TODO(GH-20300): remove this
pandas/core/arrays/numpy_.py:# TODO(NumPy1.13): remove this
pandas/core/arrays/numpy_.py:        # TODO(_values_for_fillna): remove this
pandas/core/arrays/period.py:        # TODO: remove
pandas/core/arrays/sparse.py:        # TODO(SparseArray.__setitem__): remove special cases in
pandas/core/indexes/api.py:                    # TODO: remove once pd.concat sort default changes
pandas/core/indexes/base.py:        # TODO(EA): remove index types as they become extension arrays
pandas/core/indexes/period.py:        # TODO(DatetimeArray): remove
pandas/core/internals/blocks.py:            # TODO(SparseArray.__setitem__): remove this if condition
pandas/core/internals/blocks.py:    # TODO: Refactor when convert_objects is removed since there will be 1 path
pandas/core/internals/blocks.py:                    # TODO(ExtensionArray): remove is_extension_type
pandas/core/series.py:            # TODO: remove when the default Categorical.take behavior changes
pandas/core/sparse/series.py:        # TODO: remove?
pandas/io/formats/html.py:                # TODO: Refactor to remove code duplication with code
pandas/io/formats/html.py:            # TODO: Refactor to remove code duplication with code block
pandas/plotting/_core.py:    # TODO(mpl_converter): remove once converter is explicit
pandas/tests/extension/test_categorical.py:        # TODO remove this once Categorical.take is fixed
pandas/tests/extension/test_numpy.py:    @pytest.mark.skip(reason="TODO: remove?")
pandas/tests/frame/test_to_csv.py:            # TODO: remove renaming when GH 10875 is solved
pandas/tests/sparse/series/test_series.py:        # TODO: sp_zero is not used anywhere...remove?
pandas/tests/sparse/series/test_series.py:            # TODO: expected is not used anywhere...remove?
pandas/util/_validators.py:    # TODO(PY3): Change to keyword-only args and remove all this
```

nothing jumps out as being related.
thanks @simonjayhawkins