Enable Pylint `undefined-variable` warning
Enables the pylint warning `undefined-variable`.

- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
closing as per above then, but thanks for your PR