Plotly Express (Python) showing '%customdata[1]' rather than dataframe data

Hi all,

Not sure quite how to ask this question with all required info but:

I am working on some code which will take a large dataset, run some analytical code, and display outputs using plotly express bar graphs.

The current issue I am having is:
I have created a new column in a fresh df which is a ‘summary’ of difference between two separate datasets.

When i go to display this data as hover_data, plotly is just display it’s default ‘customdata’ rather than the numerics from my dataframe.

I have tried dropping index, resetting index, re-ordering dataframe and no luck.

In semi-pseudo code I have done the following:

data["Mismatch Distribution"] = df.reset_index(drop=True)
data["Mismatch %"] = df2.reset_index(drop=True)

and my graph hover_data:

        fig =
        hover_data={"Column": True, "Mismatch %": True, "Mismatch Distribution": True})

‘Column’, ‘Mismatch %’ are showing fine, but distribution is not?

Thank you!

hi @HarryBarnard2
:wave: welcome to the community.

Can you share a sample code and data that we can run locally on our computer and replicate your error?