Python Seaborn - 3 |BAR PLOTS in Python Using Seaborn Library with MEAN, MEDIAN, SUM, COUNT agg
Вставка
- Опубліковано 21 лип 2024
- Python Seaborn - 3 | Creating BAR PLOTS in Python Using Seaborn Library with MEAN, MEDIAN, SUM or COUNT aggregation | Change the Aggregation Function in Seaborn BAR PLOT
In this video we have covered:
00:00 - Introduction
01:56 - Importing all the required libraries
03:05 - Get the list of dataframes provided with seaborn library
03:31 - Load dataframe from seaborn library | Import dataframe from seaborn library
04:03 - Import excel data using pd.read_excel
05:93 - Creating a basic BAR PLot based on one categorical and one numerical variable
05:45 - Adjusting the size/dimension of plot
07:08 - Creating BAR PLOT using two categorical and one numerica variable with the help of HUE parameter
08:35 - Change the orientation of BAR PLOT | Creat a HORIZONTAL BAR PLOT
09:29 - Change the order of columns or bars in a BAR PLOT
11:03 - Change the order of Hue variable elements in a BAR PLOT
11:33 - Adding caps on the error bar in a BAR PLOT
12:21 - Removing error bars from a BAR PLOT | Removing liens showing at the top of each column/bar in a BAR PLOT
12:46 - Change the COLOR of columns or bars in a BAR PLOT
13:25 - Changing the color palettes using palette attribute | get the list of accepatable color palettes in SEABORN PLOTS
14:40 - Changing the COLOR SATURATION of bars or columns in a BAR PLOT
15:42 - Using different statistical aggregation function in BAR PLOT other than MEAN from the Numpy Library
You can download the excel files used in this video using:
File Name : supermarket_sales.xlsx
URL : github.com/LEARNEREA/Python/t...
You can download the script created in this video using:
File Name : 3.Seaborn_BarPlot.py
URL : github.com/LEARNEREA/Python/t...
Seaborn Official website for Bar plot:
seaborn.pydata.org/generated/...
#python #pythonforbeginners #VisualizationInPython #seaborn #visualizationUsingSeaborn #BarPlotUsingSeaborn - Наука та технологія
Great video!
One comment. When ordering the list you could do like this:
ordered_columns = mart['Product line'].sort_values().unique()
sns.barplot(y='Product line', x='Total',hue='Gender', data=mart, order=ordered_columns)
I think it's more clear.
good one
Deserve more views , very well explained ..
I'm Glad you liked it
Please make a video on how to text wrap the labels on x -axis.
Sure
Is there any good ideas to display the values of the error on barplot? I could find only "ax.bar_label(ax.containers[0])" in the website for showing estimators, not errors.
Hi FOCUSED,
That would requrie us to make another video, which we will do in sometime, keep an on the channel
how do you display error bars on a barplot, when i plot my barplots they do not have error bars. However I want them to
It could be because of data, possibly the data you are using, doesn't have any error(not sure), I would rather suggest to try this once for another dataframe
in the palette , it doesn't show suggestions of colors now, how we can get suggestions of colors ?
Here you can get whole list of palletes -
seaborn.pydata.org/generated/seaborn.color_palette.html#:~:text=Possible%20palette%20values%20include%3A,'husl'%20or%20'hls'
Few more doubts -
1. What's the difference between bar plot and count plot ?
2. How to create multiple bar plots using FOR LOOP.
3. How to text wrap the axis labels ?
4. Explain how to create SUBPLOTS.
Interesting Doubts, will try to post the solution
03:48
bra...barplot 😂
yeah.. that was literally a disastrous tongue slip...........
I thought it was just me!