Thanks a lot mam I have recently begun my DS journey and have referred to many amazing tutorials for numpy, pandas , matplotlib etc. But yours was the best one I have seen so far. Thanks again
@francoquispevidal17023 жыл бұрын
Thanks youu!!! I spent my time watching many tutorials that helped me very little until I found your KZbin channel. Your videos are definitely the best.
@KimberlyFessel3 жыл бұрын
Wow -- thanks so much! Glad you are enjoying my videos and happy to hear they are helping!
@BrunoAraujo-po2lm3 жыл бұрын
Totally agree!
@vitorribeirosa3 жыл бұрын
Thank you so much for sharing these content. I have watched several of your videos and they have made my life at lab way better.
@luvpurohit74883 жыл бұрын
great set of videos,could you also do one to explain which plots to use when , i know it comes with practice
@KimberlyFessel3 жыл бұрын
Thanks -- I love this idea! I have been thinking about doing a few videos showing my thought process when selecting which figure to use and how I select my styling. It definitely comes with practice and depends on the data story, but maybe it would be helpful to show the thought process for a few examples. 👍
@manavsaxena55793 жыл бұрын
@@KimberlyFessel Yes please! As a beginner, I mostly end up using bar plot, histograms and scatter plots. I would really appreciate if you could make a video on this.
@saharatnulor74538 ай бұрын
This video is very helpful. Tank you
@KimberlyFessel8 ай бұрын
Most welcome! Glad it helped!
@katharinabuelow96603 жыл бұрын
Thank you, that was very helpful!
@KimberlyFessel3 жыл бұрын
Super -- very glad to hear that!
@Himanshu-ed3mf3 жыл бұрын
Though 'cut' column contains only two categories: 'Premium' and 'Good' but in legend it is showing all the categories. How it is possible?
@KimberlyFessel3 жыл бұрын
Yes, this is a relatively recent seaborn update. The data that come with seaborn have "category" data types for the strings. This means they have a property called .cat.categories. This gives all the categories (even the ones that aren't present), and this is what seaborn builds the legend from. You can override this either by not having the category data types (converting to strings, say) or by setting hue_order like I did in my recent countplot video here: kzbin.info/www/bejne/boaYmWZ7f9qobq8
@mohammed_Ansar3 жыл бұрын
i love your vedios.. you will make me data analyst soon..
@KimberlyFessel3 жыл бұрын
Yes! All the best on your data analyst journey!
@vedansh40332 жыл бұрын
on setting hue, cuts with value zero like 'fair', 'ideal' are also getting plotted, how to get rid of them
@peterjuhasz9762 жыл бұрын
Hi Kimberly, Thank you very much for the course! I especially like your clear explanations. I would like to add some information. I am using seaborn 0.11.2. In the diamond dataset cut, color and clarity are now type of category. So the filtered out values also appear on legend when hue is used. They also appear when you type diamonds['cut'].value_counts() with count 0. To avoid this I changed the these fields back to string with diamonds['cut'] = diamonds['cut'].astype('str'). Do you have a better solution for this? And please add this information to your notes or to the new version of this video. Thank you again.
@trellacelawrimore12152 жыл бұрын
Yes, I had the same problem!
@debatradas92682 жыл бұрын
thank you so much maam
@isabelahorta30632 жыл бұрын
Hi, Dr. Fessel! Thank you so much for the video! How can I add a trend line on the scatter plot?
@MrJojoxD2 жыл бұрын
Try using seaborn's lmplot()
@alexisrangelcalvo67812 жыл бұрын
Thanks a lot!
@evanwright6402 жыл бұрын
How do you make a midpoint for the colors?
@arul74674 жыл бұрын
thanks!! this helped a lot
@KimberlyFessel4 жыл бұрын
Awesome -- glad it helped!
@vaibhavarora94084 жыл бұрын
Thanks!
@KimberlyFessel4 жыл бұрын
Welcome!
@ASmallGreenBean4 жыл бұрын
Hi! Could you explain how you get the legend to show the correct 'custom' markers, if this is even possible? (Referring to 9:10) Thanks a lot for these videos!
@KimberlyFessel4 жыл бұрын
Hi there -- the legend in the figure you referenced was autogenerated by Seaborn, so you can match up the hue to the diamond cut and the marker shape to the diamond color. But a couple of things: 1. With the most recent update, Seaborn treats many columns as the "category" data type rather than strings. This means that if you do the filtering like I did in this video (with the old version of Seaborn), you will see many unused categories in the legend. You can either convert these columns to strings (with pandas .astype() method) or drop these unused categories (with pandas cat.remove_unused_categories() method: pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.cat.remove_unused_categories.html#pandas.Series.cat.remove_unused_categories) to make your legend look like mine. 2. Also -- you can create your own custom legend if you'd like to match up the color and marker and, say, use a labels like "Premium, F", "Premium, D", etc. This StackOverflow post walks you through how you could do that: stackoverflow.com/questions/54682473/change-legend-location-and-labels-in-seaborn-scatter-plot
@simplemente_humano3 жыл бұрын
Excellent tutorial. Learned a lot. :) In minute: 1:32, what does the argument random_state means? And why did you choose = 22?
@KimberlyFessel3 жыл бұрын
Hi there -- random_state just allows for reproducibility. Since I'm selecting a random subset of the data, using random_state sets the seed of my random number generator. That means if you run this code, you will get the same random rows as me. And the number 22 is completely arbitrary! I often choose 42 in honor of "The Hitchhiker's Guide to the Galaxy." :) But you can pick any number you'd like.
@simplemente_humano3 жыл бұрын
@@KimberlyFessel Thank you😃
@gustavoviana11782 жыл бұрын
hey nice video!
@muhdhazim58573 жыл бұрын
hi, may I know how to change hue that shows the legend into the colorbar?
@KimberlyFessel3 жыл бұрын
Hi there - once you create your color bar you can just add it to the figure and remove the current legend. This reference should be able to help you out: stackoverflow.com/questions/62884183/trying-to-add-a-colorbar-to-a-seaborn-scatterplot
@kannan.s5662 жыл бұрын
Also explain remaining parameters
@nsnilesh6043 жыл бұрын
How to write text i want to show with scatter plot
@KimberlyFessel3 жыл бұрын
Hi there - you can add text to seaborn figures by using matplotlib pyplot's text function. And here is my past video on that: kzbin.info/www/bejne/hHO8q4aXiceimq8 You can even automatically update the text positions so they don't overlap on the scatterplot using a library called AdjustText (Video here: kzbin.info/www/bejne/roS2Zmx9lptnqLM)
@kyleparsotan67992 жыл бұрын
Tried to annotate the figure: #plt.text(x_pos, y_pos, f"y = {m:.2f}x {b:.1f}", bbox=dict(facecolor='white', alpha=0.5)) #plt.text(5, 5, f'R$^2$ = {R_value:.4f}', bbox=dict(facecolor='red', alpha=0.5)) plt.annotate( # Label and coordinate 'R$^2$ = {R_value:.4f}', xy=(5, 50), xytext=(0, 80), # Custom arrow bbox=dict(facecolor='red', alpha=0.5)) but my y values no matter what way I try isn't going up or down.