STYLE use ast.parse instead of regex to fixup inconsistencies in namespace
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them

The regular expression wasn't working too well, this solution should be better. Also, like this, you can pass `--replace` and have the inconsistencies fixed up for you (though I haven't passed this by default as it may be confusing)

Just running on `pandas/tests/frame/` here, can expand to the rest in separate PRs if this is alright