Python Pandas Tutorial (Part 4): Filtering - Using Conditionals to Filter Rows and Columns

Поделиться
HTML-код
  • Опубликовано: 29 янв 2025

Комментарии • 327

  • @Skandagupta-theHunSlayer
    @Skandagupta-theHunSlayer 4 месяца назад +12

    There's nothing in your videos that can't be understand. Absolutely crystal clear explanation. Thanks Corey, 4 years later, from India.

  • @darshantawte7435
    @darshantawte7435 9 месяцев назад +25

    Even in 2024 this is still the best tutorial out there for pandas. With AI becoming capable of performing EDA and data analysis (atleast elementary which is still better than many newbie analysts), i wonder how pandas will keep up with it.

    • @douma8037
      @douma8037 6 месяцев назад

      bro but i guess building large scale AI models from scratch will definitely need pandas regardless of AI being able to do EDA and Data Analysis

    • @darshantawte7435
      @darshantawte7435 6 месяцев назад

      @@douma8037 Yeah data cleaning will play a major role even in the future.

    • @douma8037
      @douma8037 6 месяцев назад

      @@darshantawte7435 yes! We’d need pandas for that.. unless some AI comes into play of course..

  • @cordularaecke
    @cordularaecke 5 лет назад +131

    This is the best explanation of pandas dataframe boolean filtering I've ever seen - especially the inverse filter using the tilde - excellent - this is SO useful. Thank you

  • @qualjyn2
    @qualjyn2 5 лет назад +269

    Nothing like waking up a Saturday morning, and catching up on Coreys Python Pandas tutorial over a good cup of coffee :) @Corey, keep up the good work - it is really appreciated!

  • @tolulopeadedoyinadedoyin5239
    @tolulopeadedoyinadedoyin5239 3 года назад +25

    Corey is the best tutor , I have seen so far....He explains with ease and simplicity....More grace

  • @parols1160
    @parols1160 5 лет назад +75

    I guess 'flawless' is the only appropriate adjective for this whole series you are doing. Congrats from Italy Corey, keep it real!

  • @ashylarry3442
    @ashylarry3442 4 года назад +7

    I let your ads play all the way thru. Fives minutes in exchange for what you’re giving...light work. Keep it up brotha!

  • @mintymintfresh
    @mintymintfresh 3 года назад +7

    There is no better teacher on python than corey... He is simply the best one... I got to learn flask .. All thanks to corey.. There are thousands of students whom u are making a better programmer every day ...

  • @sergiomunozblanco3843
    @sergiomunozblanco3843 3 года назад +1

    I don't understand the people that vote negative to these video lectures. They are really clear, they are concise, they are practical and they are interesting. Why?

    • @kapibara2440
      @kapibara2440 11 месяцев назад

      These must be some internet troll, no need to thank about them. Just ignore them.

  • @motlatsimoea
    @motlatsimoea 2 года назад +1

    Of all the teachers I have come across on RUclips, you are my favorite. The way you explain. The example exercises you use are simple enough to comprehend while also making me feel like I could handle bigger problems.
    I learned Django from you as well. Thank you for all your work!

  • @Shaillha
    @Shaillha 4 года назад +2

    I have referred to three video tutorials/courses before this and this is by far the best course on pandas with complete coverage.
    You deserve a million likes for this series. This course is priceless.

  • @j3553hh
    @j3553hh Год назад

    Your videos are so rich with practical guidance that I'm pausing every 90 seconds to make notes. This one took me three hours to get through.

  • @akiratoriyama1320
    @akiratoriyama1320 5 лет назад +13

    Like THE BEST pandas tutorial on internet. Thanks again Corey!!

  • @niralpatel3369
    @niralpatel3369 4 года назад +6

    You're a great man Corey Schafer, This is the best channel ever on RUclips.
    Thanks form India.

  • @larz4437
    @larz4437 5 лет назад +11

    The often imitated, never duplicated, Corey Schafer. You're truly the python guide GOAT and us noobs bow before you. Thank you so much for this series and all your work.

  • @JoshBauerMuranga
    @JoshBauerMuranga Год назад

    Your contents will never go obsolate mate. Pure Gold.

  • @shanplays6001
    @shanplays6001 4 года назад +17

    Great series. I would recommend going through these tutorials once with the given dataset, and then going through it again using a dataset you're interested in. Dw, it will go alot faster the 2nd time around, and you'll get great practice actually finding insights you care about.

  • @edilgin
    @edilgin 4 года назад +3

    i started learning python basics with you and i just cant believe how much i improved myself this year, thanks a lot!

  • @Historiaplaying
    @Historiaplaying 4 года назад

    Corey, you're a god of teaching, you don't leave out anything unexplained. Thank you

  • @in_ashish
    @in_ashish 5 месяцев назад +2

    Corey is the reason i will be able to earn my bread and butter. Can't thank enough!

  • @MeherabHossainRaiyan
    @MeherabHossainRaiyan 5 месяцев назад +1

    I think it is the best tutorial i have ever seen in youtube. Good explanation sir.

  • @fuzzywuzzy318
    @fuzzywuzzy318 4 года назад +1

    I'am from china !!!!!I am your new audiance ,and feel your video is really helpful!!!!!!!thanks!!!

  • @cudanakiju0
    @cudanakiju0 3 года назад +4

    I'm reviewing your tutorial for my interview, that's awesome!
    Just to clarify one thing (part staring at ~7:00) - when combining conditions, you MUST put separate conditions into parenthesis, otherwise pandas will most likely throw quite ugly and non-intuitive error. I think that should be stressed, wasted some time on it once ;)

  • @pythonstuff8633
    @pythonstuff8633 4 года назад +2

    Bro you have no idea what help you are giving us.Thank You Keep doing what you do!

  • @JoshuaDHarvey
    @JoshuaDHarvey 4 года назад +8

    19:22 let us know when you do a video on strings! Can't wait for that and if you need any suggestions on any of the methods in the pandas .../text.html let us know! Thanks for all your hard work Corey!

  • @pierreroux-lafargue8227
    @pierreroux-lafargue8227 4 года назад +5

    You're a good man Corey Schafer, thanks for the quality content.

  • @mosama22
    @mosama22 Год назад +1

    Thank you so much for the beautiful video 😊, would someone please put a link for the truth table Corey mentioned in the video. Thank you 😊😊

  • @jasonbwaljones
    @jasonbwaljones 3 года назад

    This is the holy grail series for Pandas in 2021

  • @clexyk
    @clexyk 4 года назад +1

    Corey, your tutorials of Python are the best stuff I have ever seen. The ones on Pandas is again of very high quality.

  • @nascentnaga
    @nascentnaga 9 месяцев назад +17

    this is fresh in 2024 :)

  • @kingveelatte41
    @kingveelatte41 3 года назад

    Found this channel couple weeks ago, and I watch it almost everyday know, like watching fiction series i love. Thank you Corey for amazing video (I forgot if I already comment like this in another video but yeah Thank you as always)

  • @akintonaolawalesamuel2236
    @akintonaolawalesamuel2236 5 лет назад +2

    Lucid. Concise. Thanks a bunch, Corey, for all you do to make us Pythonistas

  • @sshbk5878
    @sshbk5878 2 года назад

    Corey is the best, following you since 2020

  • @YeekyYeeky
    @YeekyYeeky 5 лет назад +2

    Corey Schafer is really great at explaining things , thank you very much !

  • @Takk6
    @Takk6 4 года назад +7

    I rarely comment but I've watched alot of Pandas tutorials on youtube and this is by far the best one Ive seen. Subscribed.
    Will you be doing a Scikit-learn tutorial in the future?

    • @coreyms
      @coreyms  4 года назад +7

      Thanks! And yes, I will be covering that, but I don’t have a timeframe of when this will be yet.

  • @Lars7878
    @Lars7878 5 лет назад +5

    I love that .Str.contains filter, that is a brilliant idea, I never came up with.

  • @abanerjee3704
    @abanerjee3704 4 года назад

    That was the best quality content on Pandas. Keep it up brother.
    ALL THE BEST.

  • @MrGokTR
    @MrGokTR 5 лет назад +3

    Thanks for sharing such an amazing series. You are basically representing the Zen of Python in person!

  • @pythonwala510
    @pythonwala510 5 лет назад +1

    Your video of pandas series is very helpfull for me to underatand python. I like your way of delivering the explanation. I'm eagerly waiting for your next video.

  • @shamseshifat7825
    @shamseshifat7825 4 года назад +1

    Your in-depth knowledge in python is astonishing!
    The thing that always amazes me is, when you finish explaining a topic and I ask myself " Now what if I try to do that?" kinda questions and within no seconds I see you explaining the same question! 😳
    Do you mind read your viewers or what? 😅
    Anyways, you are a legend

  • @TopBagon
    @TopBagon 5 лет назад +7

    Your tutorials are the best ones I've ever seen in my life ._. thanks you so much for those, we appreciate this a lot
    *Simply Amazing*

  • @chrissteele9540
    @chrissteele9540 5 лет назад +6

    You have a way of making any topic seem sooo simple... You're an incredible teacher! I owe most of my python skills to you btw ─ thanks :)
    Please keep the videos coming!

  • @robertobr234
    @robertobr234 2 года назад

    I have watched this video many times. When I forget how to use LOC I come here to remember. It's one of the most useful functions in Pandas.

  • @KeithFlint350
    @KeithFlint350 3 года назад

    Proper tutorial with a proper English

  • @kingkai129
    @kingkai129 5 лет назад +1

    I'm so thankful that I found your channel!!!!

  • @Rajesh-nb9de
    @Rajesh-nb9de 3 года назад

    This is the best library to learn pandas... love from india

  • @HaoranZhang-jc8fq
    @HaoranZhang-jc8fq 7 месяцев назад +1

    Your lectures are so great!!

  • @prmurali1leo
    @prmurali1leo 4 года назад

    This is awesome, Coreys in the best tutor ever i have experienced

  • @KeithFlint350
    @KeithFlint350 3 года назад +2

    4:20 if the filter is saved as a variable then you can easily use it many times in the code. Doesn't matter for a presentation at school, but matters a lot when you're building an actual app

  • @crazybigworld9357
    @crazybigworld9357 2 года назад

    Thank you Corey. You're one of my best Python Teachers.

  • @rudiklein
    @rudiklein 5 лет назад +2

    What can I say...great job with this series. Again.

  • @vijaybabu3923
    @vijaybabu3923 5 лет назад +1

    Very fluid explanation of Pandas 👌 thanks Corey !

  • @ndiayemodou3474
    @ndiayemodou3474 4 года назад +6

    There is also someone from Senegal west Africa :)
    you are amazing !

  • @pouyarahimpour484
    @pouyarahimpour484 2 года назад

    When negated the filt statement (9:19) you should have said 'and' instead of 'or'. Thanks for this great series.

  • @tarunmahendra4233
    @tarunmahendra4233 3 года назад

    this is the best one ever.
    Really enjoying this series
    Thanks Corey!!

  • @mazensleiman3863
    @mazensleiman3863 3 года назад

    a big fat thank you Corey, that is one amazing video. and I will definitely watch the whole series

  • @zahidkamil7833
    @zahidkamil7833 5 лет назад +2

    Can't wait for the string method you said in pandas. I am really looking forward for that. Thank you so much for all your effort and help! :)

  • @rishikambhampati2862
    @rishikambhampati2862 4 года назад +3

    Though we have an idea of the concept, there will always be something new to learn from your videos. As usual thanks a lot.

  • @josephsteen230
    @josephsteen230 5 лет назад +7

    As per your request: I would like to see you upload a video about truth tables. I like the way you explain things, Corey. Your Panda series is helping a lot. So thanks for what you do!

  • @anuragshukla7813
    @anuragshukla7813 5 лет назад +1

    Thank you so much for posting the high quality and so knowledgeable video on youtube. And this is the best channel ever channel on youtube I have seen. You are doing great work keep it up, brother.
    Thank you again for these type videos, Please keep on posting these type of video in the future also.

  • @arifchowdhury7089
    @arifchowdhury7089 3 года назад

    So easy when Corey explains

  • @lilahinzelbergyifa292
    @lilahinzelbergyifa292 4 года назад +2

    Corey, this is simply great! Thanks!

  • @eduardolima5495
    @eduardolima5495 3 года назад

    Really, I'm so thankful for this series!! I really really appreciate your effort to make those videos and teach me something new!

  • @atulkumar7030
    @atulkumar7030 5 лет назад +1

    He is an awesome tutor! Boss really impressed by your videos. Please start with ML based contents soon.

  • @junaidmalik9593
    @junaidmalik9593 4 года назад +2

    your playlist is amazing.
    to be honest i have taken dozens of courses online for python on many platforms but non of those have been completed beyond 20 %. looking forward to gain the skill here at least, as its fun to hear and v understandable

  • @saikiranedits802
    @saikiranedits802 5 лет назад +2

    Very very thankful for your videos.
    ❤ from INDIA

  • @danielflorea3001
    @danielflorea3001 3 года назад

    Really a pragmatic video on Pandas. Great work

  • @압둘하미드이드리스
    @압둘하미드이드리스 7 месяцев назад

    Thanks for the 'data filtering' code as it helped in my project.

  • @jeanaimegakwerere5359
    @jeanaimegakwerere5359 11 месяцев назад

    Love how you filtered comma rows with comma separated data👋

  • @mikshubhatt1175
    @mikshubhatt1175 4 года назад

    i appreciate your work. you are putting some serious efforts in your videos.

  • @felipegutierre7037
    @felipegutierre7037 2 года назад

    Corey, your job is awesome, thank you for this free content!

  • @thefireagen
    @thefireagen 4 года назад +1

    So far so good explanation..I have been watching the series since its started...I came again to revise.
    just a quick suggestion from my side...please give a suitable name to filter variable so that it will look readable if someone wants to understand whats happening.

  • @SuperBhavanishankar
    @SuperBhavanishankar 2 года назад

    15:34 this SAVED MY INTERVIEW! 😗😗😗😗

  • @auroshisray9140
    @auroshisray9140 4 года назад

    Your tutorials are well structured and easy to understand. Thank you so much

  • @Fantasy7117
    @Fantasy7117 Год назад

    I'm loving your lessons😊 thank you

  • @parthagheda
    @parthagheda 2 года назад

    thank you so much Corey for this Pandas playlist, I love them, they are super helpful.

  • @dmitrishostakovich3156
    @dmitrishostakovich3156 4 года назад +1

    There's a little mistake at 9:20. The opposite of this conditional has & instead of |. So:
    filt_2 = (df['last'] == "Schafer") | (df["first"] == "John")
    ~filt_2 = (df['last'] == "Schafer") & (df["first"] == "John")
    Still, great videos. I'm very grateful. Please keep it up.

  • @gibranportillo5876
    @gibranportillo5876 5 лет назад +2

    You're the best. thanks so much!! Greetings From Mexico

  • @sartajsingh8459
    @sartajsingh8459 3 года назад

    Thank you so much for making these videos. They are really helpful to me in learning ML and AI

  • @shantanukaushikmathoholic
    @shantanukaushikmathoholic 11 месяцев назад

    awesome, this series is going good...

  • @eltorayy11
    @eltorayy11 3 года назад

    I really like the way you explained! Thank you so much

  • @Troyjl_3
    @Troyjl_3 2 года назад

    Your page is helping me so much in my new engineering position
    Thank you and I would love to ask you questions!?

  • @roywilson9580
    @roywilson9580 5 лет назад +1

    Thanks, Corey for uploading this interesting, useful and educational video. It was a great help in understanding the process of filtering data in Pandas. Will be really useful to me.

  • @muhammedyousri4080
    @muhammedyousri4080 3 года назад

    Very useful as always , Thanks a lot Corey.

  • @bjorncalbes7604
    @bjorncalbes7604 2 года назад

    these videos are gold very helpful i was lucky enough to find your channel and really help me better understand python
    i have a question, after applying the filter it shows the index. and the email, how can you just get the email string so you can assign it to another string or use it?

  • @libertarianmonk7013
    @libertarianmonk7013 2 года назад

    Thank you very much!
    The last command was the one I was looking for 😊

  • @paulosergioschlogl9550
    @paulosergioschlogl9550 4 года назад +1

    You do a awesome job man!

  • @jorginh05
    @jorginh05 2 года назад

    You saved my life!!!
    thank you for the content

  • @MANISH12665
    @MANISH12665 6 месяцев назад +1

    Hey Corey I have just completed your tutorial on flask i just love the way you taught . I have one request can you please make a tutorial on Python Pyramid framework . I found everywhere but there is no proper tutorial on Pyramid framework on youtube or any other learning platform Can you please make a tutorial on Pyramid framework

  • @TheRuggedBlade
    @TheRuggedBlade 3 года назад

    Your videos are incredible. You gotta come back and start posting again

  • @nikhilgoud9019
    @nikhilgoud9019 4 года назад

    The true,false series returned from filter it's actually same concept applied in RDBMS Whenever we apply condition only the true values of the rows are printed I really like the way you explain the stuff keep it going and thank you for your valuable content

  • @supriya1316
    @supriya1316 2 года назад

    Great. I am really happy learning from your channel. You explain the concepts with so much clarity . Thanks a ton . Could you please also suggest some of the resources for practicing all the concepts learnt so far .

  • @nicholasmaloof8378
    @nicholasmaloof8378 5 лет назад +132

    Would you be willing to do a video on numpy?

    • @JoshuaDHarvey
      @JoshuaDHarvey 4 года назад +1

      I'm pretty new to python in general but isn't most of pandas built on numpy, so I imagine there is quite a bit of common ground between the two libs?

    • @jeetpatel6679
      @jeetpatel6679 4 года назад +8

      ruclips.net/video/QUT1VHiLmmI/видео.html his tutorial is good

    • @deepdoshi2734
      @deepdoshi2734 4 года назад +1

      @@jeetpatel6679 Thank you

    • @sensei249
      @sensei249 4 года назад +1

      @@jeetpatel6679 that's the best available video for numpy, even i was going to suggest it. after 1 hour lecture you are ready to go.

    • @alenjose3903
      @alenjose3903 4 года назад

      @@jeetpatel6679 thanks

  • @kapibara2440
    @kapibara2440 11 месяцев назад +1

    Your audience is also from Poland. Thank you Corey :)

    • @Cloudjiek
      @Cloudjiek 5 месяцев назад

      I second that!

  • @ShafrazThawfeek
    @ShafrazThawfeek 5 лет назад +1

    Love from Sri Lanka!

  • @alejandropaloalto538
    @alejandropaloalto538 2 года назад

    Thanks Corey, I see you from Mexico

  • @MehmoodAhmedMooD
    @MehmoodAhmedMooD 4 года назад

    Thanks a lot for your superb tutorials man. Just the right amount of info for beginners

  • @dipanjan93
    @dipanjan93 3 года назад +2

    @Corey Many thanks for posting your tutorials mate. These are super helpful getting started with Pandas. I have a doubt @6:03, you mentioned that you prefer to use df.loc[filt, 'email'] for filtering over a specific column, however I was able to achieve the same with df[filt].email as well ? Do you mind explaining this. Thanks. Cheers!

  • @muntadher8087
    @muntadher8087 3 года назад

    Thank you Corey!!
    Amazing video

  • @MrBoaredman
    @MrBoaredman 3 года назад

    This Tutorial, and you Sir, are life savers. Thank you so much