DEPR: Hide deprecated attrs _AXIS_NAMES & _AXIS_NUMBERS by topper-123 · Pull Request #38740 · pandas-dev/pandas (original) (raw)

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