Flagged as duplicate, it is not.
I am aware of the axes.bxp answers on SO, I've read them and wrote the SQL query the way I did because of them.
There are no answers on SO to my knowledge that address how to group with multiple columns using axes.bxp, which is challenging and thus the question.
Original question:
Making an enhanced version of this:
Using the graphic as a reference, my 1
and 2
come from the different values in my_data_col
below. My grouping columns (Weeks
in the graphic) are group_1
and group_2
- group_2
is a subgroup of group_1
.
I can't figure out how to do the grouping.
I'm using matplotlib.axes.axesx.bxp because the data is large, I do the calculations on the database side and export the data.
The closest answer I've found is here but it's not quite there.
Thank you for helping me.
Sample DataFrame
of my SQL
results:
my_data_col | group_1 | group_2 | med | q1 | q3 | whislo | whishi |
---|---|---|---|---|---|---|---|
dist_to_datum | high | center | 145.9 | 145.8 | 146.1 | 145.3 | 146.6 |
dist_to_datum | high | left | 100.2 | 88.3 | 110.8 | 54.6 | 144.6 |
dist_to_datum | high | right | 156.1 | 155.1 | 159.0 | 149.2 | 164.9 |
dist_to_datum | low | center | 56.3 | 52.3 | 64.0 | 34.7 | 81.6 |
dist_to_datum | low | left | 38.6 | 36.7 | 38.7 | 33.7 | 41.7 |
dist_to_datum | low | right | 64.1 | 62.7 | 66.6 | 56.9 | 72.4 |
dist_to_apex | high | center | 161.1 | 158.8 | 162.7 | 153.0 | 168.5 |
dist_to_apex | high | left | 164.1 | 162.3 | 164.2 | 159.5 | 167.0 |
dist_to_apex | high | right | 157.4 | 157.1 | 159.1 | 154.1 | 162.1 |
dist_to_apex | low | center | 71.5 | 70.0 | 77.1 | 59.4 | 87.7 |
dist_to_apex | low | left | 70.1 | 68.7 | 70.6 | 65.9 | 73.4 |
dist_to_apex | low | right | 69.5 | 69.1 | 69.7 | 68.2 | 70.6 |