TST: Test pivot_table() with categorical data
- [x] closes #21370
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

@jorisvandenbossche @jschendel Just had a go at this - let me know if any changes required Don't know why CI is failing - not sure error is related to my PR 
```
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/16dbc4a2-96e5-4986-aa53-46b5a447d609.sh
pytest -m "single and not slow and not network" -n 1 -s --strict --durations=10 --junitxml=test-data-single.xml pandas
Traceback (most recent call last):
  File "/home/vsts/miniconda3/envs/pandas-dev/bin/pytest", line 11, in <module>
    sys.exit(main())
  File "/home/vsts/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/_pytest/config/__init__.py", line 58, in main
    config = _prepareconfig(args, plugins)
  File "/home/vsts/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/_pytest/config/__init__.py", line 182, in _prepareconfig
    config = get_config()
  File "/home/vsts/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/_pytest/config/__init__.py", line 153, in get_config
    pluginmanager.import_plugin(spec)
  File "/home/vsts/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/_pytest/config/__init__.py", line 522, in import_plugin
    __import__(importspec)
  File "/home/vsts/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/_pytest/tmpdir.py", line 25, in <module>
    class TempPathFactory(object):
  File "/home/vsts/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/_pytest/tmpdir.py", line 35, in TempPathFactory
    lambda p: Path(os.path.abspath(six.text_type(p)))
TypeError: attrib() got an unexpected keyword argument 'convert'
##[error]Bash exited with code '1'.
##[section]Finishing: Test
``` thanks @ryankarlos 