How to convert pandas IntervalIndex for histgram plotting?

I’m using pandas IntervalIndex to define bins for dataframes. Now I’d like to plot a histogram using plotly.py with the bin intervals for the x axis values. How can I convert easiest?

@fkromer Unfortunately you cannot use the intervals in a pd.IntervalIndex as prescribed bins, to define a plotly Histogram, because for a Histogram (with vertical bars) you can set either the number of bins, as
nbinsx or the start, and end values, as well as the size of bins.

For more Histrogram attributes run:
help(go.Histogram)

@empet Thx for the hint. The most easy way to get something toi work is by converting the pd.IntervalIndices to strings with .astype(str).

three reasons why you should buy plotly pro: support open source, get great support, host your plots and dashboards online