Skip to content
Advertisement

Create Boxplot Grouped By Column

I have a Pandas DataFrame, df, that has a price column and a year column. I want to create a boxplot after grouping the rows based on their year. Here’s an example:

JavaScript

So in this case, I’d want a boxplot for each of 2011, 2012, and 2013 based on their price column. I’ve looked into DataFrame.groupby but it produces a different object (a group by object).

Advertisement

Answer

JavaScript

is this what you are looking for?

enter image description here

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