✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

Add String in hover_data parameter of Pie chart

How to add String using format method of python inside hover_data parameter of pie chart?


px.pie(df_copy , values = df_copy['success'].value_counts() , names = df_copy['success'].value_counts().index , labels = {0:'Unsuccess' , 1:'Success'} ,color_discrete_sequence = ['blue', 'orange'] , hover_data = [f'Suicide cases: {df_copy['suicide'].value_counts()}'])

Screenshot of Plot:

In the above image the hover_data_0 is where I want my String(here Suicide cases ) to add, it can be anything what I want user to show on hovering.
And how to change labelvalue to something string than digits here.