Skip to content
Advertisement

Boxplot with pandas

this is how looks like my dataframe:

JavaScript

And I would like to show a Boxplot with Pandas using the AVG and the STD columns (average and standard deviation), and I don’t know how can start.

For instance, I would like to compare the four methods for PART = 1, J = 3 and P = 50 through a boxplot to see if these values are compatibles (similar) or not.

I’m very lost, any guidance?

EDIT: the following image shows what I would like. Where A, B, C and D are the methods and each box is created by the value of AVG in combination with de STD for PART = 1, J = 3 and P = 50.

enter image description here

Advertisement

Answer

You can filter the dataframe and create boxplot with parameter by.

JavaScript

For the following sample df

JavaScript

You get

enter image description here

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