BUG: clip dataframe column-wise #15390
State: closed

The  bug is due to that `where` doesn't take array-like as argument other, as documented. I just casted array like stuff to Series with appropriate index.

 - [X] closes #15390
 - [X] test_clip_against_list in frame/test_analytics and series/test_analytics
 - [X] passes ``git diff upstream/master --name-only -- '*.py' | flake8 --diff``
 - [ ] whatsnew entry


Labels:
name: Bug
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16504?src=pr&el=h1) Report
> Merging [#16504](https://codecov.io/gh/pandas-dev/pandas/pull/16504?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/9462379038c69885cf74869fff3e97c1a6d70394?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/16504/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/16504?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #16504      +/-   ##
==========================================
+ Coverage   90.94%   90.94%   +<.01%     
==========================================
  Files         161      161              
  Lines       49267    49287      +20     
==========================================
+ Hits        44804    44823      +19     
- Misses       4463     4464       +1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.71% <100%> (ø)` | :arrow_up: |
| #single | `40.17% <10.52%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16504?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/16504?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `92.29% <100%> (+0.02%)` | :arrow_up: |
| [pandas/core/config\_init.py](https://codecov.io/gh/pandas-dev/pandas/pull/16504?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29uZmlnX2luaXQucHk=) | `94.4% <0%> (-1.57%)` | :arrow_down: |
| [pandas/core/reshape/merge.py](https://codecov.io/gh/pandas-dev/pandas/pull/16504?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9tZXJnZS5weQ==) | `94.18% <0%> (-0.02%)` | :arrow_down: |
| [pandas/core/indexes/category.py](https://codecov.io/gh/pandas-dev/pandas/pull/16504?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9jYXRlZ29yeS5weQ==) | `98.18% <0%> (-0.02%)` | :arrow_down: |
| [pandas/io/formats/format.py](https://codecov.io/gh/pandas-dev/pandas/pull/16504?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvZm9ybWF0LnB5) | `96.02% <0%> (-0.01%)` | :arrow_down: |
| [pandas/core/window.py](https://codecov.io/gh/pandas-dev/pandas/pull/16504?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvd2luZG93LnB5) | `96.49% <0%> (ø)` | :arrow_up: |
| [pandas/io/stata.py](https://codecov.io/gh/pandas-dev/pandas/pull/16504?src=pr&el=tree#diff-cGFuZGFzL2lvL3N0YXRhLnB5) | `93.47% <0%> (ø)` | :arrow_up: |
| [pandas/io/sql.py](https://codecov.io/gh/pandas-dev/pandas/pull/16504?src=pr&el=tree#diff-cGFuZGFzL2lvL3NxbC5weQ==) | `94.79% <0%> (ø)` | :arrow_up: |
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/16504?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `94.9% <0%> (ø)` | :arrow_up: |
| [pandas/core/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/16504?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tbW9uLnB5) | `91.44% <0%> (ø)` | :arrow_up: |
| ... and [8 more](https://codecov.io/gh/pandas-dev/pandas/pull/16504?src=pr&el=tree-more) | |

------

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

Could you also add a release note? I think doc/source/whatsnew/v0.21.0.txt`.
thanks!