CLN: standardize different freq message
State: closed

In #24282 some of the PeriodArray/PeriodIndex methods couldn't accept the decorator because of mismatches between _DIFFERENT_FREQ and DIFFERENT_FREQ_INDEX.  This unifies the two.

The remaining case to figure out is what to render for `other_freq` when dealing with an ndarray.  Right now the placeholder is "FIXME".

Labels:
name: Datetime
description: Datetime data dtype
name: Error Reporting
description: Incorrect or improved errors from pandas
name: Frequency
description: DateOffsets

Comments:
Hello @jbrockmendel! Thanks for updating the PR.

 - There are no PEP8 issues in the file [`pandas/core/arrays/datetimelike.py`](https://github.com/jbrockmendel/pandas/blob/533ab473011d9321ded8d1ccc5cb5121b2962d4d/pandas/core/arrays/datetimelike.py) !

 - There are no PEP8 issues in the file [`pandas/core/arrays/period.py`](https://github.com/jbrockmendel/pandas/blob/533ab473011d9321ded8d1ccc5cb5121b2962d4d/pandas/core/arrays/period.py) !

 - There are no PEP8 issues in the file [`pandas/core/indexes/period.py`](https://github.com/jbrockmendel/pandas/blob/533ab473011d9321ded8d1ccc5cb5121b2962d4d/pandas/core/indexes/period.py) !

 - There are no PEP8 issues in the file [`pandas/tests/arithmetic/test_period.py`](https://github.com/jbrockmendel/pandas/blob/533ab473011d9321ded8d1ccc5cb5121b2962d4d/pandas/tests/arithmetic/test_period.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/period/test_indexing.py`](https://github.com/jbrockmendel/pandas/blob/533ab473011d9321ded8d1ccc5cb5121b2962d4d/pandas/tests/indexes/period/test_indexing.py) !



##### Comment last updated on December 14, 2018 at 22:23 Hours UTC
Perhaps hold off on this for #24024, which is changing (some) of these to use `_check_compatiable_with`.

I suppose that would be a relatively easy fix to split off from #24024, and it'd mean fewer changes here as well.
> I suppose that would be a relatively easy fix to split off from #24024, and it'd mean fewer changes here as well.

+1
I can take care of that if you like.

On Fri, Dec 14, 2018 at 2:17 PM jbrockmendel <notifications@github.com>
wrote:

> I suppose that would be a relatively easy fix to split off from #24024
> <https://github.com/pandas-dev/pandas/pull/24024>, and it'd mean fewer
> changes here as well.
>
> +1
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/24283#issuecomment-447447055>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABQHIqZ0n94rK0FFty2oDiHX_JyK4Swdks5u5AdNgaJpZM4ZULGn>
> .
>

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

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

```diff
@@            Coverage Diff             @@
##           master   #24283      +/-   ##
==========================================
+ Coverage   92.22%   92.22%   +<.01%     
==========================================
  Files         162      162              
  Lines       51828    51836       +8     
==========================================
+ Hits        47799    47807       +8     
  Misses       4029     4029
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.63% <88.46%> (ø)` | :arrow_up: |
| #single | `43% <3.84%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/24283?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/arrays/datetimelike.py](https://codecov.io/gh/pandas-dev/pandas/pull/24283/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2RhdGV0aW1lbGlrZS5weQ==) | `96.44% <100%> (ø)` | :arrow_up: |
| [pandas/core/arrays/period.py](https://codecov.io/gh/pandas-dev/pandas/pull/24283/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL3BlcmlvZC5weQ==) | `98.52% <100%> (+0.02%)` | :arrow_up: |
| [pandas/core/indexes/period.py](https://codecov.io/gh/pandas-dev/pandas/pull/24283/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9wZXJpb2QucHk=) | `93.06% <50%> (ø)` | :arrow_up: |

------

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

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

```diff
@@            Coverage Diff             @@
##           master   #24283      +/-   ##
==========================================
+ Coverage   92.22%   92.22%   +<.01%     
==========================================
  Files         162      162              
  Lines       51824    51828       +4     
==========================================
+ Hits        47795    47799       +4     
  Misses       4029     4029
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.62% <86.95%> (ø)` | :arrow_up: |
| #single | `43.01% <8.69%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/24283?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/arrays/datetimelike.py](https://codecov.io/gh/pandas-dev/pandas/pull/24283/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2RhdGV0aW1lbGlrZS5weQ==) | `96.44% <100%> (ø)` | :arrow_up: |
| [pandas/core/arrays/period.py](https://codecov.io/gh/pandas-dev/pandas/pull/24283/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL3BlcmlvZC5weQ==) | `98.5% <100%> (+0.01%)` | :arrow_up: |
| [pandas/core/indexes/period.py](https://codecov.io/gh/pandas-dev/pandas/pull/24283/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9wZXJpb2QucHk=) | `93.06% <50%> (ø)` | :arrow_up: |

------

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

lgtm. @TomAugspurger if ok for you to merge ping (or merge)