BUG: Add test to ensure, that bug will not occur again. #33058
- [x] xref #33058
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Should I add a whatsnew entry? It's not really new, if it is backported to 1.0.1.
Thanks @phofl for the PR. changing closes #33058 to xref until a decision re backport.

> Should I add a whatsnew entry?

not needed marked as 1.1 but could backport if fixed on 1.0.x @phofl can you merge upstream master Hello @phofl! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:



There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2020-04-02 19:12:29 UTC @simonjayhawkins Done. /azp run <samp>
Azure Pipelines successfully started running 1 pipeline(s).<br>

</samp> > So I'm not sure this is worth adding a test for - mutating the argument during a `.apply` seems fraught with peril and I'm a little hesitant to make guarantees about behavior
> 
> @jorisvandenbossche do you have a strong preference towards adding this?

this is fine, we currently support mutating inside an apply, though we have an issue to deprecate. sounds good Thanks @phofl  Sorry @jreback merged while you were commented; i can do in a follow up thanks @WillAyd 