create plot with groupby

Viewed 17

i need your help in performing an analysis, respective creating a plot.

I have a grouped dataset, see below:

import seaborn as sns

tips = sns.load_dataset('tips')
agg_tips = tips.groupby(['day','sex'])['tip'].sum().unstack().fillna(0)
print(agg_tips)

That´s the result:

sex     Male  Female
day                 
Thur   89.41   82.42
Fri    26.93   25.03
Sat   181.95   78.45
Sun   186.78   60.61

Now, i tried to plot row by row. each row [day] should plot the value in column [Male] and [Female].

It doesn´t work, due to the headers. I have 1 header with "sex","male" and "female" and a second one with "day"

Can you support me to create a scatter plotting row by row with all columns?

BR

enter image description here

0 Answers
Related