CLN: algos
State: closed

- clean up select_n algos
- clean ensure_data
closes #15903

should make this much simpler going forward. All dtype conversions are now centralized.
Added some doc-strings as well.

Labels:
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Clean

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

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

```diff
@@            Coverage Diff             @@
##           master   #15929      +/-   ##
==========================================
+ Coverage   90.96%   90.97%   +<.01%     
==========================================
  Files         145      145              
  Lines       49557    49474      -83     
==========================================
- Hits        45081    45007      -74     
+ Misses       4476     4467       -9
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.73% <98.7%> (-0.01%)` | :arrow_down: |
| #single | `40.68% <41.12%> (+0.06%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/15929?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/types/dtypes.py](https://codecov.io/gh/pandas-dev/pandas/pull/15929?src=pr&el=tree#diff-cGFuZGFzL3R5cGVzL2R0eXBlcy5weQ==) | `95.38% <100%> (+0.04%)` | :arrow_up: |
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/15929?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `94.96% <100%> (ø)` | :arrow_up: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/15929?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.57% <100%> (ø)` | :arrow_up: |
| [pandas/types/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/15929?src=pr&el=tree#diff-cGFuZGFzL3R5cGVzL2NvbW1vbi5weQ==) | `93.64% <50%> (-0.3%)` | :arrow_down: |
| [pandas/core/algorithms.py](https://codecov.io/gh/pandas-dev/pandas/pull/15929?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYWxnb3JpdGhtcy5weQ==) | `94.52% <99.1%> (+0.59%)` | :arrow_up: |
| [pandas/core/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/15929?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tbW9uLnB5) | `91.03% <0%> (+0.34%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15929?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/15929?src=pr&el=footer). Last update [4502e82...76653eb](https://codecov.io/gh/pandas-dev/pandas/pull/15929?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
hey actually decreased lines even though I added comments, whoo hoo!