I have a pandas DataFrame created from a dict and would like to create a plotly line plot from it. The DataFrame contains lists however and looks like this:
a ... L
0 a_0 ... [L_00, L_01]
1 a_1 ... [L_10, L_11]
2 a_2 ... [L_20, L_21]
3 a_3 ... [L_30, L_31]
My plot should be the values of L_i0 plotted against a_i but I can only create the plot giving the name of a column like this:
fig = px.line(dataframe, x='a', y='L')
I know that I can access the values like this ['L'][i][0] and then iterate over i but is it possible to tell plotly to take only the first values of the list L?
Sample dataframe
df = pd.DataFrame({'a':[1,2,3],
'L':[[10,11,12], [20,21,22], [30,31,21]]})
