BUG: remove usage of _constructor._get_axis_number (fix when _constructor properties return callables) by jorisvandenbossche · Pull Request #46018 · pandas-dev/pandas (original) (raw)
See report at #32860 (comment) (and we also run into this one case in geopandas). Also related to #32638
As far as I know this is the only remaining case where we rely on _constructor
/_constructor_sliced
/_constructor_expanddim
returning a class and not a generic callable (in geopandas, we also have a workaround for this one case).
This specific case was introduced in #34837 to avoid circular dependencies/imports, so therefore I added the DataFrame import inline.