Seaborn countplot | What is the countplot? | Seaborn countplot vs barplot

Поділитися
Вставка
  • Опубліковано 4 вер 2024

КОМЕНТАРІ • 63

  • @kaduflutist
    @kaduflutist Рік тому +1

    Thanks a ton, Kimberly! I enjoy the way you teach and show the code without hiding anything. Great job!

  • @gauthamambethkar4483
    @gauthamambethkar4483 3 роки тому +1

    Just now completed the whole seaborn playlist. Thank you so much for making it really easy for us.

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому

      Oh wow! Thanks for watching! Very glad to hear it was helpful.

  • @neelsamshah
    @neelsamshah 3 роки тому +1

    Thank you for creating these videos. They are great. Both the syntax for creating the plots as well as how seaborn creates these plots are explained very clearly.

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому

      Thanks very much for the compliment! Glad to hear the syntax and the explanation are clear 😀

  • @justinfoster5995
    @justinfoster5995 2 роки тому +1

    I was going nuts trying to figure out how to make days of the week show up in order on my plots. As always it turns out to be really simple once you know how. Thanks!

  • @AE-pv9vc
    @AE-pv9vc 3 роки тому +1

    Yet again, your videos are helping me understand my coursework. Thanks so much- PhD well deserved!

  • @rskura
    @rskura 3 роки тому

    The outtakes at the end are hilarious!

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому

      Haha - glad you enjoyed them! I like having fun with those. 😄

  • @yodude8325
    @yodude8325 2 роки тому

    The videos are such high quality. Thankyou so much Kimberly! This playlist helped me alot

  • @abcdefghi2650
    @abcdefghi2650 2 роки тому

    Thank you Kimberly, for making our life easier :))

  • @WillOstrick
    @WillOstrick 2 роки тому +1

    Your videos are very helpful and informative, love what you are doing :)

  • @satender7625
    @satender7625 Рік тому

    You well explained ma'am
    Thanks for such vedio

  • @sanjaysanjay862
    @sanjaysanjay862 2 роки тому

    This sns series is super cool

  • @thepresistence5935
    @thepresistence5935 3 роки тому

    I am your 4k subscriber! happy to be in 4k.

  • @gyanabrota
    @gyanabrota 3 роки тому +2

    Nice. Informative

  • @Mockingbirdrye
    @Mockingbirdrye 2 роки тому

    Powerful addition; thank you! Count axis is in decimals, however ... how to specify axis in integer values?

  • @marawankhaled5611
    @marawankhaled5611 3 роки тому +3

    you are great

  • @Hashimhamza007
    @Hashimhamza007 3 роки тому

    Thank you very much. I found this series really helpful. I've a doubt with countplot? how do we display it with percentage instead of count/frequency?

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому +1

      So glad you are liking the series! Unfortunately, using percentages isn't currently an option within the countplot, but as Michael Waskom the author of seaborn points out, you could accomplish this using the seaborn barplot instead: github.com/mwaskom/seaborn/issues/1027

  • @Camila-fv9qj
    @Camila-fv9qj Рік тому

    If i had sea_animal , animals , weight , how i can put sea_animal , animal in y axis
    And weight in x axis

  • @wani212
    @wani212 3 роки тому

    Thank you for creating this video

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому

      You are so welcome - thank you for watching this video!

  • @davidjackson7675
    @davidjackson7675 5 місяців тому

    Good stuff!

  • @wadanali4938
    @wadanali4938 3 роки тому

    Absolutely great video

  • @nithinkurakula5608
    @nithinkurakula5608 2 роки тому

    How to show the number of counts on each bar using countplot?

  • @rishidixit7939
    @rishidixit7939 3 місяці тому

    I used both Histplot and Countplot on categorical data and both provided similar results so what is the difference between the two ?

    • @KimberlyFessel
      @KimberlyFessel  2 місяці тому +1

      Great question - the output looks very similar but the input can be quite different. For the histplot, you'll have a column of numbers. Those can be integers or floating point numbers with a decimal. Seaborn will automatically make buckets for those numbers and count up how many numbers it sees within the range of each bucket (e.g. how many numbers fall somewhere within 3 to 5?) With the countplot, however, you'll often have a column full of categorical items, such as a column full of text values like dog, cat, and bird. Seaborn will tally up how many of each item it sees in that column (e.g. how many times does the word "dog" appear in the "pets" column?). Things can get fancier from there, but that's the rough gist. 👍

    • @rishidixit7939
      @rishidixit7939 2 місяці тому +1

      @@KimberlyFessel Thanks a Lot😊

  • @ShovonMallick41
    @ShovonMallick41 3 роки тому

    how to add data labels on the top of each bar with seaborn countplot?

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому +1

      Very good question - and I plan to address this in a seaborn Q&A video coming up! I would probably use matplotlib's plt.text() function to do this, but the tricky part will be grabbing the right numbers and lining up the values in the right spot. Something similar to what I did here: ua-cam.com/video/NBYzSaTbodM/v-deo.html

  • @yashsaxena7754
    @yashsaxena7754 2 роки тому

    Can anyone suggest how can i annotate a seaborn countplot??

  • @jonasfelix7700
    @jonasfelix7700 3 роки тому

    Thx! Great video! How to add numbers to the top of the bars? There are many examples, but shouldn’t that be a default option for bar and countplot?

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому +1

      Right? That would be glorious, but it isn't a default option as far as I can tell for the current version of seaborn. (Though it is an option with the heatmap through the annot keyword.) It's a bit more challenging to write perfectly robust code to do this since the scale of the counts changes -- and especially for the barplot where we also have the confidence intervals to contend with. From what I have seen, cycling through the patches seems to be the best bet for now. You've probably already seen it, but if not, this post has some options: stackoverflow.com/questions/31749448/how-to-add-percentages-on-top-of-bars-in-seaborn

    • @jonasfelix7700
      @jonasfelix7700 3 роки тому

      @@KimberlyFessel thank you for the insight!

  • @vinitpol2225
    @vinitpol2225 2 роки тому

    Thank you so much mam ❤❤😍😍😍

  • @wadanali4938
    @wadanali4938 3 роки тому

    Love the way you teach

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому +1

      Why thank you!

    • @wadanali4938
      @wadanali4938 3 роки тому +1

      @@KimberlyFessel because it was the easy way, we got everything very soon

  • @yuchaozhang3587
    @yuchaozhang3587 3 роки тому

    Great series of videos for Seaborn. Would you like to make a video about factorplot?

    • @yuchaozhang3587
      @yuchaozhang3587 3 роки тому

      Oops, it seems that factorplot is a older version of catplot. I will check out your catplot video!

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому

      Yes! I was just about to recommend the catplot - it has a lot of great functionality!

  • @vedantsharma6113
    @vedantsharma6113 3 роки тому

    Thanks!

  • @kadambinisinha6001
    @kadambinisinha6001 3 роки тому

    Was really useful🙌

  • @scarylooksoundgroup4638
    @scarylooksoundgroup4638 3 роки тому

    Professional content👏

  • @mohitbhongale4461
    @mohitbhongale4461 Рік тому

    thank u

  • @genildomoura
    @genildomoura 3 роки тому

    Hi, Please, How do we print the number above each bar? thanks a lot.

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому +1

      Great question and I plan to add this to my upcoming seaborn Q&A video! I would probably use matplotlib's plt.text() function, but the tricky part will be grabbing the right numbers and lining up the values in the right spot. Something similar to what I did here should do the trick: ua-cam.com/video/NBYzSaTbodM/v-deo.html

    • @genildomoura
      @genildomoura 3 роки тому +1

      @@KimberlyFessel thanks for your reply 😀

  • @lawrencetaulk7898
    @lawrencetaulk7898 3 роки тому

    great video. love it!

    • @KimberlyFessel
      @KimberlyFessel  3 роки тому

      Thank you very much - I appreciate the support! 😄

  • @sharkk2979
    @sharkk2979 2 роки тому

    gud tut! ty

  • @dongmeili891
    @dongmeili891 3 роки тому

    Thanks.