Black Lives Matter. Please consider donating to Black Girls Code today.

Configure Hoverdata using values from a pandas.Dataframe column

I would like to add values in the hoverteplate inserted from the dataframe I’m extracting the data from:

fig7 = go.Figure(layout=layout) #
x=df_portfolio_projection[‘Total Product Cost (Unit)’],
hovertemplate=‘Total Asset Value (Unit): {x:,.0f}<br>' +'EBITDA Margin (%): %{y:,.0f}
name=‘Total Product Cost (Unit)’,
color=‘rgba(0, 131, 255, 0.6)’,
line=dict(color=‘rgba(0, 131, 255, 1.0)’, width=3)

An example of the frame columns would be the following:

Index(['Supplier', 'Expected Income', 'Average Daily demand', 'EBITDA (Unit)',
       'EBITDA (Container)', 'EBITDA Margin (%)',
       'Total Asset Value (Container)', 'Total Product Cost (Container)',
       'Total Shipment', 'Total Asset Value (Unit)',
       'Total Product Cost (Unit)', 'Total Shipment (Unit cost)',
       'Inventory cost (Container)', 'Units per container',

An example of what I would need to do is show in the tooltip are

Total Asset Value (Unit), ‘EBITDA Margin’, ‘Total Asset Value (Container)’