I have a pandas DataFrame that looks like this.
0 1 2 3 4 5 6 7 8 9 Group
0 0.0 0.0 0.0 12.5 12.5 0.0 0.0 12.5 0.0 12.5 1
1 0.0 12.5 12.5 12.5 0.0 0.0 0.0 0.0 12.5 12.5 1
2 37.5 37.5 37.5 0.0 37.5 37.5 25.0 25.0 37.5 25.0 1
3 25.0 50.0 25.0 25.0 50.0 50.0 25.0 0.0 37.5 50.0 1
4 50.0 62.5 50.0 62.5 50.0 50.0 62.5 50.0 62.5 50.0 1
0 12.5 12.5 0.0 0.0 12.5 12.5 0.0 0.0 12.5 0.0 2
1 0.0 0.0 12.5 12.5 0.0 12.5 0.0 0.0 25.0 25.0 2
2 50.0 25.0 37.5 12.5 37.5 25.0 37.5 25.0 37.5 37.5 2
3 25.0 50.0 25.0 12.5 37.5 37.5 25.0 0.0 37.5 50.0 2
4 62.5 50.0 50.0 62.5 50.0 50.0 62.5 50.0 62.5 50.0 2
Now i want too create a grouped lineplot with seaborn with two lines, one based on group 1 the other on group 2. The x-values are supposed to be the row-index (0,1,2,3,4) and the y-values should be the means+confidence intervals based on each row of my DataFrame.
My problem is that my dataformat is very different from what seaborn seems to require as input and I am not experienced with DataFrames so I do not know how to transform it correctly.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.