TYP: fix a few errors found by pandas-stub
There are (unsurprisingly) many errors when trying to use pyright/mypy to validate pandas-stub's tests against the pandas annotations. This PR fixes three of them.
thanks @twoertwein 