Closed
Description
This PR regards searching the non-test codebase (i.e. don't find code examples in pandas/tests) for examples like the following:
Try to find and replace logic like:
if axis in [0, "index"]:
...
elif axis in [1, "columns"]:
...
else:
...
with the standard codebase method get_axis_number(axis)
. This is a DataFrame method so often you need use local DataFrame objects to call this method.
It may also be necessary to change axis
args in internal methods to consistently accept the same input format compatible with this method, i.e. axis as an integer (0 or 1).
This is an open issue and contributions are welcome to solve individual files in the code. As an example see #43078 or other merged contributions below.