Home > Software engineering >  How to plot when columns are rows of dictionaries with a numpy array
How to plot when columns are rows of dictionaries with a numpy array

Time:07-29

I have a dataframe with a dict inside each cell that contains data like the pic attached, I want to plot column 1 and 2 (index order) to get something like this:

enter image description here

n = len(df3)
fig,ax = plt.subplots() 
for i in range(n):
       ax.plot([*df3[i][:,1].values()], [*df3[i][:,2].values()],label=df3[i][:,0])
plt.show()

I tried the code below but isnt working, any guide ples thanks!!

Here is the pk file: enter image description here

  • Related