Visualize three columns

Hi together,

imagine a DataFrame like this:

      Names      Day          Number
0     John        1             2
1     John        2             2
2     Sam         1             2
3     Sam         3             2
4     Jane        2             2
5     Jane        5             2

This DF show requests to people with the Day of Week of creation of the requests.
E.g. John has a sum of 2 requests. One request on Day 1 and and one request on Day 2.

I want to create Bar Chart with this Data but don’t know how to handle this 3 columns in one Bar Chart. Can somebody help me how to visualize this?

Thanks in advance for any help,
Simo

What exactly do you wish to convey through your bar chart? The y-axis can be the Number columns. What will the x-axis be?

Because you have Day as days in the week. So the x-axis could be 7 tick marks for each day of the week. But then what information do you wish to show for each day since you want to use all 3 columns?

If you want to use Names as well, then for each day you could have several names corresponding to that same day, which might not be the best way to visualize the information. Because you will have several bars per day then.

Or you could have x-axis as the Names, but then depending on your data that could be lots of names on the x-axis, and for each name you would have multiple bars corresponding to each day.

So, try to think about what you want the visualization to convey first.

Hi @the_doctor thanks for your fast reply.
Well, i want to visualize how many requests are related to each person. Additional i want to show from which day of the week are this requests.

So i think the x-axis will be the names of the persons and the y-axis will be the number of requests. But how to implement the day of the week the requests are created? I need to put 3 columns into my barchart not only 2.

Simo

Using seaborn -

import seaborn as sns 
sns.catplot(x="Names", y="Number", col="Day", col_wrap=2,
            kind="bar", data=df);

remove the col_wrap param if you want all the subplots in the same row. col_wrap=2 will keep maximum of 2 in a single row then wrap the others.

Hi @bholaprasad26 thanks for this!
I thought there is a way to have anything in one BarChart and maybe with different colors for each day? Like a stacked bar chart. Do you have any idea how I can realize this with seaborn?

Thanks for your help again! Made my day.

Simo