Pandas version checks

  • [X] I have checked that this issue has not already been reported.

  • [X] I have confirmed this bug exists on the latest version of pandas.

  • [X] I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

NA

Issue Description

In the plotting code we have a few places where we check self.data.columns._holds_integer and one on index.inferred_type. AFAICT these are almost equivalent to just checking the dtype of the columns/index, but with some corner cases for object-dtype indexes. I don't think we should be special-casing these corner cases. We should deprecate that special-casing and move to dtype-based checks.

Expected Behavior

NA

Installed Versions

Replace this line with the output of pd.show_versions()

Comment From: lazarust

@jbrockmendel and @lithomas1 I can take this!

Comment From: lazarust

take