replace NotImplementedError with AttributeError
Fixes Python inspection of members - bug reported in https://github.com/pandas-dev/pandas/issues/31474

- [ ] closes #31474
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
