vendredi 20 novembre 2020

How to display Dash table with different column names than in the dataframe?

I have a dataframe with name and value for several metrics. I want to display them in a table like this: enter image description here

The problem is that the dataframe contains the values like this: enter image description here

How can i show 'metrics' in the name column, while the 0.23 value in the value column in Dash? So far, I can only display the values like this: enter image description here

The code used for figure 3 is below:

data_output = df['metrics'].to_dict('rows')
column_output = [{"name": column_name, "id": column_name} for column_name in
                             df[dropdown_value].columns]



Aucun commentaire:

Enregistrer un commentaire