TYP: misc cleanup in core\generic.py
pandas\core\generic.py:4707: error: Unsupported operand types for in ("Optional[str]" and "str")  [operator]
pandas\core\generic.py:6559: error: 'builtins.object' object is not iterable  [misc]
