ENH: correlation function accepts method being a callable
State: closed

- other than the listed strings for the `method` argument, accept a callable for generic correlation calculations
- ~~~minor fix of = to == in requirements file~~~

- [ ] closes #xxxx (no issue opened for PR)
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry (not sure if I should do this or the person merging this PR)


Labels:
name: Enhancement
name: Algos
description: Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff

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

 - There are no PEP8 issues in the file [`pandas/core/frame.py`](https://github.com/shadiakiki1986/pandas/blob/4a69a70604a8f019b31428b16e72df9a97317567/pandas/core/frame.py) !

 - There are no PEP8 issues in the file [`pandas/core/nanops.py`](https://github.com/shadiakiki1986/pandas/blob/4a69a70604a8f019b31428b16e72df9a97317567/pandas/core/nanops.py) !

 - There are no PEP8 issues in the file [`pandas/core/series.py`](https://github.com/shadiakiki1986/pandas/blob/4a69a70604a8f019b31428b16e72df9a97317567/pandas/core/series.py) !

 - There are no PEP8 issues in the file [`pandas/tests/series/test_analytics.py`](https://github.com/shadiakiki1986/pandas/blob/4a69a70604a8f019b31428b16e72df9a97317567/pandas/tests/series/test_analytics.py) !



##### Comment last updated on September 26, 2018 at 02:15 Hours UTC
This doesn't fix any issue, but I added a note in the 0.24.0 release notes
@TomAugspurger yep agreed
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22684?src=pr&el=h1) Report
> Merging [#22684](https://codecov.io/gh/pandas-dev/pandas/pull/22684?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/a936399a539927eb74f06920f5e0a8a71b4cec56?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #22684      +/-   ##
==========================================
+ Coverage   92.18%   92.19%   +<.01%     
==========================================
  Files         169      169              
  Lines       50819    50821       +2     
==========================================
+ Hits        46850    46852       +2     
  Misses       3969     3969
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.6% <100%> (ø)` | :arrow_up: |
| #single | `42.37% <0%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/22684?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/nanops.py](https://codecov.io/gh/pandas-dev/pandas/pull/22684/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvbmFub3BzLnB5) | `95.14% <100%> (+0.01%)` | :arrow_up: |
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/22684/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `93.74% <100%> (ø)` | :arrow_up: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/22684/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.2% <100%> (ø)` | :arrow_up: |

------

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

thanks @shadiakiki1986 nice change!