DEPR: deprecate get_ftype_counts (GH18243)
State: closed

Deprecate NDFrame.get_ftype_counts()

- [X] closes #18243
- [X] tests added / passed
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] whatsnew entry

Labels:
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Deprecate
description: Functionality to remove in pandas

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

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

```diff
@@            Coverage Diff             @@
##           master   #20404      +/-   ##
==========================================
+ Coverage   91.79%   91.85%   +0.05%     
==========================================
  Files         152      152              
  Lines       49215    49236      +21     
==========================================
+ Hits        45179    45225      +46     
+ Misses       4036     4011      -25
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.24% <ø> (+0.05%)` | :arrow_up: |
| #single | `41.88% <ø> (+0.03%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/20404?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/20404/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `95.86% <ø> (ø)` | :arrow_up: |
| [pandas/core/arrays/categorical.py](https://codecov.io/gh/pandas-dev/pandas/pull/20404/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2NhdGVnb3JpY2FsLnB5) | `96.2% <0%> (-0.02%)` | :arrow_down: |
| [pandas/core/dtypes/missing.py](https://codecov.io/gh/pandas-dev/pandas/pull/20404/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL21pc3NpbmcucHk=) | `91.07% <0%> (ø)` | :arrow_up: |
| [pandas/core/reshape/reshape.py](https://codecov.io/gh/pandas-dev/pandas/pull/20404/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9yZXNoYXBlLnB5) | `100% <0%> (ø)` | :arrow_up: |
| [pandas/core/strings.py](https://codecov.io/gh/pandas-dev/pandas/pull/20404/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3RyaW5ncy5weQ==) | `98.32% <0%> (ø)` | :arrow_up: |
| [pandas/core/indexes/datetimelike.py](https://codecov.io/gh/pandas-dev/pandas/pull/20404/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZWxpa2UucHk=) | `96.72% <0%> (ø)` | :arrow_up: |
| [pandas/core/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/20404/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYmFzZS5weQ==) | `96.78% <0%> (ø)` | :arrow_up: |
| [pandas/core/panel.py](https://codecov.io/gh/pandas-dev/pandas/pull/20404/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcGFuZWwucHk=) | `97.29% <0%> (ø)` | :arrow_up: |
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/20404/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `93.84% <0%> (ø)` | :arrow_up: |
| [pandas/core/indexes/category.py](https://codecov.io/gh/pandas-dev/pandas/pull/20404/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9jYXRlZ29yeS5weQ==) | `97.3% <0%> (ø)` | :arrow_up: |
| ... and [11 more](https://codecov.io/gh/pandas-dev/pandas/pull/20404/diff?src=pr&el=tree-more) | |

------

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

Hello @GGordonGordon! Thanks for updating the PR.







Cheers ! There are no PEP8 issues in this Pull Request. :beers: 

##### Comment last updated on March 27, 2018 at 02:35 Hours UTC
Could you try merging master into your branch? We had to do some history rewriting.

________________________________
From: Grant Smith <notifications@github.com>
Sent: Tuesday, March 20, 2018 6:27:41 PM
To: pandas-dev/pandas
Cc: Tom Augspurger; Mention
Subject: Re: [pandas-dev/pandas] DEPR: deprecate get_ftype_counts (GH18243) (#20404)


@GGordonGordon commented on this pull request.

________________________________

In pandas/core/indexes/base.py<https://github.com/pandas-dev/pandas/pull/20404#discussion_r175953463>:

> @@ -3396,8 +3396,11 @@ def map(self, mapper, na_action=None):

     def isin(self, values, level=None):
         """
+        Return a boolean array where the index values are in `values`.


@TomAugspurger<https://github.com/tomaugspurger> - Appears they snuck in with that large pd file under commit 4a43815<https://github.com/pandas-dev/pandas/commit/4a43815d97811e1d4da78f495df3180e09eae7aa> (GH20249)

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://github.com/pandas-dev/pandas/pull/20404#discussion_r175953463>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ABQHIv6jezZu64997O7vdorPS_qujSN2ks5tgZBtgaJpZM4SvfkK>.

@TomAugspurger - I've added the bases.py changes back in but left the large pd file out per your request.
Thanks @GGordonGordon !
@TomAugspurger the problem with the big .pd file, was that due to our rewriting of the history? I mean, will each PR that gets updated on master have this problem? (I don't see how you would get it from merging master or rebasing on master)
I think it was because @GGordonGordon forked this branch from a master that included the big pd file. So anyone who created a branch during that ~7 hours might have the file in their PRs.
OK, that should be not too many PRs then :)