TST: Check map function works with StringDtype (#40823)
Checks map function output on 2 DataFrames with data type StringDtype.

- [ ] closes #40823
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
