DEPR: Hide deprecated attrs _AXIS_NAMES & _AXIS_NUMBERS by topper-123 · Pull Request #38740 · pandas-dev/pandas (original) (raw)
- closes FutureWarning: _AXIS_NAMES has been deprecated. #38722
- tests added / passed
- passes
black pandas
- passes
git diff upstream/master -u -- "*.py" | flake8 --diff
- whatsnew entry
Users that do e.g. [getattr(pd.DataFrame, x) for x in dir(pd.DataFrame())]
or inspect.getmembers(pd.DataFrame())
currently get an unfriendly deprecation warning. This fixes that by adding _AXIS_NAMES
& _AXIS_NUMBERS
to _hidden_attrs
.
@JSunRae, is it possible for you to add this to your pandas source code and see if this fixes your problem?
xref: #33637