Skip to content
Advertisement

Plot multiple columns of dataframe in multiple plots (Python)

i want to plot multiple columns from a dataframe in multiple plots.

My code looks like this:

JavaScript

The error i get is:

JavaScript

I know x and y need to have the same shape, but how can i solve this problem here? My entire data is within one dataframe and should have the same shape. Is it possible to pass a list as a y value and change the shape?

My data looks like this: enter image description here

JavaScript

Advertisement

Answer

I am not sure what output you are expecting, but the following code can be used to resolve the above error. I have matched the stocks for the sample data, but the column names are different.

JavaScript

enter image description here

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement