Fix #12564 for Categorical: consistent result if comparing as DataFrame
- [x] closes #12564 
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry

pls add a whatsnew note in Bug Fixes as well (for 0.18.1)
 ok, I'll add a whatsnew note by tomorrow.
 Thanks for your advice, @jreback.
Is it OK? and do I need to rebase for resolving conflicts?
 @ningchi if you could that'd be great. It's probably just a conflict in the whatsnew file. And if your comfortable you can squash your commits down to a nice single message too.
 yes, pls rebase
 many thanks! I have rebased these commits.
 thanks @ningchi 
