Pandas dataframe with multiple observations per model I currently have a pandas dataframe with the following format

    Model      Metric                     Value
--------------------------------------------------------------
0     Ours     Accuracy  [0.79, 0.79, 0.82]
1   Theirs     Accuracy  [0.68, 0.56, 0.64]
2     Ours  Sensitivity  [0.64, 0.55, 0.55]
3   Theirs  Sensitivity  [0.82, 0.82, 0.78]
4     Ours  Specificity  [0.68, 0.48, 0.6] 
5   Theirs  Specificity  [0.68, 0.48, 0.6]


In the evaluation script I am writing I want to be able to take into account situations where the training of a model is repeated multiple times, the results are stored in an numpy array (Value column). For visualization with seaborn, i believe i need a long form where it looks something like this:

    Model      Metric                     Value
--------------------------------------------------------------
0     Ours     Accuracy                   0.79
1     Ours     Accuracy                   0.79
2     Ours     Accuracy                   0.82
3     Theirs   Accuracy                   0.68
4     Theirs   Accuracy                   0.56
5     Theirs   Accuracy                   0.64
6     Ours     Sensitivity                0.64
...   ....     ...                        ...


I cannot figure out how to do this.
# create the df
df = pd.DataFrame({'model':['our','theirs'],'metric':['acc','sen'],'value':[np.array([1,2,3]),np.array([4,5,6])]})
# unzip the array into three columns
df[['ex1','ex2','ex3']]=pd.DataFrame(df['value'].to_list(),index=df.index)
# melt df to long df
df.melt(id_vars=['model','metric'],value_vars=['ex1','ex2','ex3'])


You may need to sort the dataframe as you like.