BUG: Fixed NDFrame.transform('abs')
State: closed

Closes https://github.com/pandas-dev/pandas/issues/19760

So this is a hacky workaround. I think we would ideally whitelist a set of valid NDFrame.transform methods, but I don't want to break things. What would that list include?

- abs
- pct_change
- shift
- tshift
- cum*

Labels:
name: Regression
description: Functionality that used to work in a prior pandas version
name: Apply
description: Apply, Aggregate, Transform, Map

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20800?src=pr&el=h1) Report
> Merging [#20800](https://codecov.io/gh/pandas-dev/pandas/pull/20800?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/31e77b0b4129134d20cd5027dac0adb9fbd2dca0?src=pr&el=desc) will **decrease** coverage by `0.06%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #20800      +/-   ##
==========================================
- Coverage   91.85%   91.78%   -0.07%     
==========================================
  Files         153      153              
  Lines       49310    49273      -37     
==========================================
- Hits        45292    45224      -68     
- Misses       4018     4049      +31
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.17% <100%> (-0.08%)` | :arrow_down: |
| #single | `41.88% <0%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/20800?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/apply.py](https://codecov.io/gh/pandas-dev/pandas/pull/20800/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXBwbHkucHk=) | `96.78% <100%> (+0.04%)` | :arrow_up: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/20800/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `63.2% <0%> (-3.61%)` | :arrow_down: |
| [pandas/core/nanops.py](https://codecov.io/gh/pandas-dev/pandas/pull/20800/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvbmFub3BzLnB5) | `95.13% <0%> (-1.17%)` | :arrow_down: |
| [pandas/core/resample.py](https://codecov.io/gh/pandas-dev/pandas/pull/20800/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzYW1wbGUucHk=) | `96.06% <0%> (-0.37%)` | :arrow_down: |
| [pandas/core/arrays/categorical.py](https://codecov.io/gh/pandas-dev/pandas/pull/20800/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2NhdGVnb3JpY2FsLnB5) | `95.7% <0%> (-0.08%)` | :arrow_down: |
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/20800/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.63% <0%> (-0.06%)` | :arrow_down: |
| [pandas/core/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/20800/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tbW9uLnB5) | `92.01% <0%> (-0.03%)` | :arrow_down: |
| [pandas/core/indexes/datetimelike.py](https://codecov.io/gh/pandas-dev/pandas/pull/20800/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZWxpa2UucHk=) | `96.7% <0%> (-0.02%)` | :arrow_down: |
| [pandas/io/formats/latex.py](https://codecov.io/gh/pandas-dev/pandas/pull/20800/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvbGF0ZXgucHk=) | `100% <0%> (ø)` | :arrow_up: |
| [pandas/core/arrays/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/20800/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2Jhc2UucHk=) | `84.14% <0%> (ø)` | :arrow_up: |
| ... and [8 more](https://codecov.io/gh/pandas-dev/pandas/pull/20800/diff?src=pr&el=tree-more) | |

------

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

I'd also add fill and rank to your list. FWIW there's probably a lot of overlap with the groupby module and what it considers to be a transformation vs an aggregation. Wonder if we should keep all of these functions and their "application type" in a shared module for both DataFrame and GroupBy ops
This should be for 0.23. It's a regression and was included in the docs.