DOC: Update sort_index docs
- [x] closes #31880
@WillAyd Good to merge or were there changes you'd like me to make? Not sure if there's a "nice" way to get around the mypy annoyance Yea would be nice to get the typing figured out, but OK for another day Thanks @dsaxton 