ENH: case_when function
- [x] closes #39154 
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Continues the work started by @ElHoussineT(#50343)

- uses `pd.Series.mask` under the hood
- function implementation, as well as a Series method
Hi @mroeschke @rhshadrach @phofl  can I pls get some feedback on this PR. thanks Please merge with current `main`.  Your PR is deleting code recently merged. @Dr-Irv thanks for the feedback. I have merged with current main - i still notice extra files that shouldnt pop up for review, since it has nothing to do with this PR. open to suggestions on how to fix this. thanks > @Dr-Irv thanks for the feedback. I have merged with current main - i still notice extra files that shouldnt pop up for review, since it has nothing to do with this PR. open to suggestions on how to fix this. thanks

I don't think you did it correctly.  I am just looking at `_typing.py`, and it shows you deleted stuff.

Do
```bash
git fetch upstream
git merge upstream/main
git push origin case_when
```
 thanks @Dr-Irv i will close this PR, I created a new one - hopefully the issues wont resurface. #55390 > thanks @Dr-Irv i will close this PR, I created a new one - hopefully the issues wont resurface. #55390

I looked briefly, and see that the issue is gone. But others will need to approve that PR.