API: expose dtypes in pandas.api.types
State: closed

xref #16015
xref https://github.com/apache/arrow/pull/585
xref https://github.com/pandas-dev/pandas/issues/16042
xref https://github.com/pandas-dev/pandas/pull/15541#issuecomment-286008496

Labels:
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: API Design

Comments:
this is what was discussed in #16015, exposing the extension dtype constructs in ``pandas.api.types``. This will facilitate others having permanent public location to access.
cc @wesm @jorisvandenbossche @TomAugspurger 

I think this should fix the public exposure.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16099?src=pr&el=h1) Report
> Merging [#16099](https://codecov.io/gh/pandas-dev/pandas/pull/16099?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/19fc8dac68e088126ffd132dc322dbf8a163ec69?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/16099/graphs/tree.svg?height=150&width=650&token=eZ4WkYLtcO&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/16099?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #16099      +/-   ##
==========================================
+ Coverage   90.83%   90.84%   +<.01%     
==========================================
  Files         159      159              
  Lines       50783    50784       +1     
==========================================
+ Hits        46131    46136       +5     
+ Misses       4652     4648       -4
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.62% <100%> (ø)` | :arrow_up: |
| #single | `40.35% <100%> (+0.01%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16099?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/api/types/\_\_init\_\_.py](https://codecov.io/gh/pandas-dev/pandas/pull/16099?src=pr&el=tree#diff-cGFuZGFzL2FwaS90eXBlcy9fX2luaXRfXy5weQ==) | `100% <100%> (ø)` | :arrow_up: |
| [pandas/core/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/16099?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tbW9uLnB5) | `90.68% <0%> (-0.35%)` | :arrow_down: |
| [pandas/\_version.py](https://codecov.io/gh/pandas-dev/pandas/pull/16099?src=pr&el=tree#diff-cGFuZGFzL192ZXJzaW9uLnB5) | `44.65% <0%> (+1.9%)` | :arrow_up: |

------

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

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

```diff
@@            Coverage Diff             @@
##           master   #16099      +/-   ##
==========================================
- Coverage   90.86%   90.86%   -0.01%     
==========================================
  Files         159      159              
  Lines       50773    50771       -2     
==========================================
- Hits        46136    46133       -3     
- Misses       4637     4638       +1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.64% <100%> (-0.01%)` | :arrow_down: |
| #single | `40.34% <100%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16099?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/api/types/\_\_init\_\_.py](https://codecov.io/gh/pandas-dev/pandas/pull/16099?src=pr&el=tree#diff-cGFuZGFzL2FwaS90eXBlcy9fX2luaXRfXy5weQ==) | `100% <100%> (ø)` | :arrow_up: |
| [pandas/core/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/16099?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tbW9uLnB5) | `90.68% <0%> (-0.35%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/16099?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `79.13% <0%> (-0.06%)` | :arrow_down: |

------

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