I have some data where I manipulated a data framework using the following code:
import pandas as pd import numpy as np data = pd.DataFrame([[0,0,0,3,6,5,6,1],[1,1,1,3,4,5,2,0],[2,1,0,3,6,5,6,1],[3,0,0,2,9,4,2,1],[4,0,1,3,4,8,1,1],[5,1,1,3,3,5,9,1],[6,1,0,3,3,5,6,1],[7,0,1,3,4,8,9,1]], columns=["id", "sex", "split", "group0Low", "group0High", "group1Low", "group1High", "trim"]) data
My question is how to create averages using ggplot or seaborn, so for each split level I get a graph that looks like this:

At the bottom of the code, you can see that I tried to split the group factor so that I could split the columns, but this led to an error (KeyError: 'group'), and I think this is due to the path I used multi-indexing