BUG: DataFrame.apply not adding a frequency if freq=None (#22150)
State: closed

- [x] closes #22150
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Frequency
description: DateOffsets
name: Apply
description: Apply, Aggregate, Transform, Map

Comments:
@HannahFerch : Good start!  Will need a `whatsnew` and test(s) as well.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22561?src=pr&el=h1) Report
> Merging [#22561](https://codecov.io/gh/pandas-dev/pandas/pull/22561?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/0976e1261781153603064eb67d66630a099edcd7?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/22561/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/22561?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #22561      +/-   ##
==========================================
- Coverage   92.17%   92.17%   -0.01%     
==========================================
  Files         169      169              
  Lines       50708    50706       -2     
==========================================
- Hits        46740    46738       -2     
  Misses       3968     3968
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.58% <ø> (-0.01%)` | :arrow_down: |
| #single | `42.35% <ø> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/22561?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/22561/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.66% <ø> (-0.02%)` | :arrow_down: |

------

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

this needs tests. you can simply add the OP hypthoesis test (and the minimal example if needed). pls add a whatsnew note in 0.24
Thanks for the feedback. 
@jreback Not sure what is meant by the OP hypothesis test. I would add a test similar to the example @mroeschke shared in #22150 - would that be sufficient?
@HannahFerch ideally if you could include this test https://github.com/pandas-dev/pandas/issues/22150#issuecomment-410211224 in our testing suite, that'd be great.

I think `pandas/tests/frame/test_apply.py` should be an apt location for the test.
Hello @HannahFerch! Thanks for updating the PR.

 - There are no PEP8 issues in the file [`pandas/core/indexes/datetimes.py`](https://github.com/HannahFerch/pandas/blob/827178efd7364421b03f6cc74c7d30e222e5147d/pandas/core/indexes/datetimes.py) !

 - There are no PEP8 issues in the file [`pandas/tests/frame/test_apply.py`](https://github.com/HannahFerch/pandas/blob/827178efd7364421b03f6cc74c7d30e222e5147d/pandas/tests/frame/test_apply.py) !


@mroeschke Thanks, have tried to do as you suggested
@mroeschke Done. Please let me know if anything else is needed from my side.
thanks @HannahFerch