How do I filter rows of a pandas DataFrame by column value?

Let's say that you only want to display the rows of a DataFrame which have a certain column value. How would you do it? pandas makes it easy, but the notation can be confusing and thus difficult to remember. In this video, I'll work up to the solution step-by-step using regular Python code so that you can truly understand the logic behind pandas filtering notation.
SUBSCRIBE to learn data science with Python:
kzread.info?su...
JOIN the "Data School Insiders" community and receive exclusive rewards:
/ dataschool
== RESOURCES ==
GitHub repository for the series: github.com/justmarkham/pandas...
"loc" documentation: pandas.pydata.org/pandas-docs/...
== LET'S CONNECT! ==
Newsletter: www.dataschool.io/subscribe/
Twitter: / justmarkham
Facebook: / datascienceschool
LinkedIn: / justmarkham

Пікірлер: 753

  • @Diachron
    @Diachron7 жыл бұрын

    Most people would have simply demonstrated the short way, but by taking the time to elucidate what's happening behind the scenes, you're performing a far greater service. Great job.

  • @dataschool

    @dataschool

    7 жыл бұрын

    Thanks so much for your thoughtful comment! I really appreciate your support.

  • @trs4184

    @trs4184

    3 жыл бұрын

    Him: So here's how you filter out by certain values. Me: *Copies code* Gotacha, thanks. Him: But that's the long way and you'd never actually do that Me: Oh haha of course. *deletes code*

  • @guptaachin
    @guptaachin7 жыл бұрын

    You say just the right words to get the concept and everything behind with lucidity. Thank you. i am a beginner but do not feel like so. :)

  • @dataschool

    @dataschool

    7 жыл бұрын

    Wow, what a nice thing to say! :)

  • @samuelgeorge6756

    @samuelgeorge6756

    6 жыл бұрын

    I watch you at 1.5x :-D but like he said even a year later. Nice way to teach. Thank you.

  • @alexcipriani6003

    @alexcipriani6003

    5 жыл бұрын

    you deserve my tuition money for that

  • @saimaacademy5537

    @saimaacademy5537

    5 жыл бұрын

    kzread.info/dash/bejne/qKCalrKnadGzpco.html

  • @guidogaggl4020

    @guidogaggl4020

    5 жыл бұрын

    Achin Gupta: my words. This guy is awesome

  • @seangriffin3601
    @seangriffin36014 жыл бұрын

    3 years later and this dude is still a legend and still saving my ass on basic stuff for work!

  • @dataschool

    @dataschool

    4 жыл бұрын

    Ha! That's great to hear 😎

  • @leonardoferigutti9039
    @leonardoferigutti90393 жыл бұрын

    Everything you're doing here for us, it's gonna go back to you in a certain way in the future! Thank You a lot for this master piece!!

  • @dataschool

    @dataschool

    3 жыл бұрын

    You are too kind, thank you! 🙏

  • @zeeshantaj55
    @zeeshantaj555 жыл бұрын

    You are the only man I can understand on KZread about Data Science.

  • @dataschool

    @dataschool

    5 жыл бұрын

    Ha! Thank you :)

  • @FergusMcGee
    @FergusMcGee4 жыл бұрын

    Thank you so much. I'm new to pandas as this was very helpful, I couldn't understand why it wasn't obvious how to filter rows. You explained it so clearly.

  • @adityaladia3293
    @adityaladia32934 жыл бұрын

    Awesome explanation! I have referred to some resources on pandas earlier and felt like i could easily skip your content to get through faster and grab only the unknown piece of code in the process . But the way you explain things it shows your hold on pandas and i am highly motivated to go through the full video. Cheers great job.

  • @ThePRINCEBARPAGA
    @ThePRINCEBARPAGA4 жыл бұрын

    Your voice is so soothing and makes the understanding of concepts much easier and enjoyable. Thank You

  • @dataschool

    @dataschool

    4 жыл бұрын

    Thank you!

  • @guillermobarrio55
    @guillermobarrio554 жыл бұрын

    When great teaching meets simplicity. Thanks so much!

  • @dataschool

    @dataschool

    4 жыл бұрын

    Thank you so much! 🙏

  • @LyyrRATM
    @LyyrRATM6 жыл бұрын

    There is something charming in how you say "Okay" when you finish a thought :) The video is very helpful. Thanks for putting this up here.

  • @dataschool

    @dataschool

    6 жыл бұрын

    Ha! Glad my verbal tics are charming :)

  • @ludovicolaci9582

    @ludovicolaci9582

    4 жыл бұрын

    @@dataschool Kevin.verbal_function.finish_thought is this right?

  • @ASpace25
    @ASpace253 жыл бұрын

    It's imperative that you know the logic behind these codes. Thank you Mark for this amazing playlist.

  • @dataschool

    @dataschool

    3 жыл бұрын

    My pleasure!

  • @kingsleyobodomechine933
    @kingsleyobodomechine9335 жыл бұрын

    you are a great tutor, taking the long road and then giving the short answer really teaches the concept very well. Thank you sooo much

  • @dataschool

    @dataschool

    5 жыл бұрын

    You're very welcome!

  • @rohitekka2674
    @rohitekka26743 жыл бұрын

    I loved how you showcased every possible way, from the heavy technique of using a for loop and then right to using operators. It made things absolutely clear. Thanks!!

  • @dataschool

    @dataschool

    2 жыл бұрын

    You're very welcome!

  • @sanaullahkhanhassanzai8432
    @sanaullahkhanhassanzai84325 жыл бұрын

    You are the best Pandas teacher on KZread. I saw your previous videos as well but this is by far the best. You made the whole concept so simple. Thank you very much

  • @dataschool

    @dataschool

    5 жыл бұрын

    Wow! Thank you so much for your kind words! :)

  • @lexboegen
    @lexboegen7 жыл бұрын

    I like your in-depth explanation of _how_ it works, rather than a "recipe" of "just do it this way" without explaining _why_ it works. Now I'm off to see what other videos on pandas you have!

  • @dataschool

    @dataschool

    7 жыл бұрын

    Excellent! I'm glad the depth of the explanation was helpful to you! My complete pandas playlist is here: kzread.info/head/PL5-da3qGB5ICCsgW1MxlZ0Hq8LL5U3u9y

  • @user-oj8nq4wn8n
    @user-oj8nq4wn8n6 жыл бұрын

    Despite the fact that English is not my native language, these are the best lessons about the Pandas that I saw! Thank you!

  • @dataschool

    @dataschool

    6 жыл бұрын

    It's great to hear that my videos have been helpful to you! :)

  • @RAWRCoding
    @RAWRCoding5 жыл бұрын

    Can't believe you do the entire video with so little edits. Amazing!

  • @dataschool

    @dataschool

    5 жыл бұрын

    It requires a lot of planning... plus it helps that I love teaching this subject and I know it well!

  • @sajeendrann
    @sajeendrann6 жыл бұрын

    It's was THAT simple, yeah? I wasted two days trying to figure it out myself. Life saver you are. Thanks for the wonderful vdo.

  • @dataschool

    @dataschool

    6 жыл бұрын

    You're welcome!

  • @alessandrosarretta11
    @alessandrosarretta118 жыл бұрын

    Thanks, great step by step learning resource! I already knew the quick answer, but not the reason why it was working :-) Very informative!

  • @dataschool

    @dataschool

    8 жыл бұрын

    +Alessandro Sarretta You're welcome! I think you will find that understanding how it works in this case will help you to better understand lots of other pandas functionality!

  • @yuriwrlk
    @yuriwrlk6 жыл бұрын

    The explanations are really well conceived and you speak so clearly that even the youtube captioner can capture it, subscribed!

  • @dataschool

    @dataschool

    6 жыл бұрын

    Awesome! Thanks for subscribing, and thanks for your kind comment!

  • @rishisagar4695
    @rishisagar46954 жыл бұрын

    Love these, helped with something I was stuck on for 2 days. I'm a beginner, loads of love

  • @dataschool

    @dataschool

    4 жыл бұрын

    Great to hear!

  • @GurunathHari
    @GurunathHari5 жыл бұрын

    You are an amazing presenter. Knowledgeable, fluent, crystal clear. Much respect. Let me know how i can give something back to you.

  • @dataschool

    @dataschool

    5 жыл бұрын

    Thank you so much! If you want to support me, I'd love for you to join my community of "Data School Insiders" on Patreon: www.patreon.com/dataschool

  • @GrumpyDerg
    @GrumpyDerg7 жыл бұрын

    Many thanks for revealing the mystery behind the weirdness of the filtering syntax. I've been using it already, but now I realize the reason behind it, which is pretty cool!

  • @dataschool

    @dataschool

    7 жыл бұрын

    You're very welcome! I find that understanding filtering helps you to better understand how to use pandas as a whole, which is why I decided to explain it. Glad it was helpful to you!

  • @MichaelCrossUK
    @MichaelCrossUK7 жыл бұрын

    Your videos really are terrifically helpful, explaining things thoroughly from base concepts upwards as you do is just brilliant and your explanations are always extremely clear and precise. Thank you so much for all the time you spend on this - I'm tremendously grateful as I'm sure are many others.

  • @dataschool

    @dataschool

    7 жыл бұрын

    Wow, thank you so much for your incredibly kind words! I'm very glad to hear that you have gotten a lot out of the series.

  • @ravivashatkar5585
    @ravivashatkar55856 жыл бұрын

    Love this video !! Exactly the one I was looking for. THANK YOU !... well explained..

  • @dataschool

    @dataschool

    6 жыл бұрын

    You're very welcome! :)

  • @yucelozyazgan
    @yucelozyazgan7 жыл бұрын

    he put step by step all the stones in my brain and set the wall! :D Simply great !

  • @dataschool

    @dataschool

    7 жыл бұрын

    I love the metaphor... thanks for your kind words! :)

  • @yucelozyazgan

    @yucelozyazgan

    7 жыл бұрын

    ;)

  • @hoomandehghani2035
    @hoomandehghani2035 Жыл бұрын

    Thank you. I believe by showing us the theory behind it, you're helping us remember the method for a far longer period

  • @dataschool

    @dataschool

    Жыл бұрын

    You’re very welcome!

  • @lucasfrancab
    @lucasfrancab3 жыл бұрын

    Such a pretty explanation. Now I discovered the 'Why' i use the bracket. Thanks!

  • @dataschool

    @dataschool

    2 жыл бұрын

    You're welcome!

  • @KingLiongWong
    @KingLiongWong Жыл бұрын

    Very clear explanation and make me understand how the logic works behind the filter. Great thanks.

  • @dataschool

    @dataschool

    Жыл бұрын

    You're very welcome!

  • @jaywiji
    @jaywiji4 жыл бұрын

    Your explanations are so clear. Thanks

  • @erikahuerta2140
    @erikahuerta21408 жыл бұрын

    Great videos! I have been struggling with the ideas and concepts behind decision trees and ensembles. I hope these are topics that you will cover in the future and if not, I would really appreciate any resources to gain a deeper understanding of this topic. Thank you!

  • @dataschool

    @dataschool

    8 жыл бұрын

    Thanks! Regarding decision trees and ensembles, I highly recommend chapter 8 of this book for a conceptual understanding: www-bcf.usc.edu/~gareth/ISL/ Here are videos related to that book: www.dataschool.io/15-hours-of-expert-machine-learning-videos/ For Python code and more resources, see classes 17 and 18 of my data science course: github.com/justmarkham/DAT8 Hope that helps!

  • @tomhas4442
    @tomhas44423 жыл бұрын

    Very nice thurrough explanation! 🙏 thanks

  • @dataschool

    @dataschool

    3 жыл бұрын

    Thank you!

  • @oculusvirtualreality
    @oculusvirtualreality5 жыл бұрын

    All the concepts very well explained. Your videos on pandas tutorial are just great !!

  • @dataschool

    @dataschool

    5 жыл бұрын

    Thanks! :)

  • @russnagel1
    @russnagel13 жыл бұрын

    Thank you. Great content is still great, even 5 years later!

  • @dataschool

    @dataschool

    3 жыл бұрын

    Thanks very much for your kind words!

  • @mayanknaithani5412
    @mayanknaithani54126 жыл бұрын

    thanks , I learnt more from your videos than other online pandas resources combine

  • @dataschool

    @dataschool

    6 жыл бұрын

    You're very welcome!

  • @sapnapatil27
    @sapnapatil277 жыл бұрын

    Very nice tutorials. Easy to understand and to the point. Please prepare more for Data analysis.

  • @dataschool

    @dataschool

    7 жыл бұрын

    Thanks for your kind words, and for the suggestion!

  • @GiggsBeckham
    @GiggsBeckham5 жыл бұрын

    I've learnt so much through watching this one video. Thank you. Now, I may need to re-write some my existing codes to make it more efficient and simple to comprehend. :-)

  • @dataschool

    @dataschool

    5 жыл бұрын

    Great to hear!

  • @iccherherbarium9688
    @iccherherbarium96886 жыл бұрын

    a big thanks for putting an end to my last 3 hours' confused state.

  • @dataschool

    @dataschool

    6 жыл бұрын

    Great to hear!! You are very welcome!

  • @bitmagazin303
    @bitmagazin3036 жыл бұрын

    Man. You helped million times more than pandas documentary..

  • @dataschool

    @dataschool

    6 жыл бұрын

    Great to hear! :)

  • @alabtv4879
    @alabtv48793 жыл бұрын

    Explained with brilliance! Congrats.

  • @dataschool

    @dataschool

    2 жыл бұрын

    Thank you!

  • @mohammadfahim8870
    @mohammadfahim88706 жыл бұрын

    Thanks !! I was looking for something very specific and 2 of your videos was just right on point ... just subscribed !!

  • @dataschool

    @dataschool

    6 жыл бұрын

    Awesome! Thanks for subscribing :)

  • @handet.6235
    @handet.62357 жыл бұрын

    Bro, you are just great teacher! Please keep going what you are already doing. I'll buy whatever you produce! God bless you! :)

  • @dataschool

    @dataschool

    7 жыл бұрын

    Thanks so much, I appreciate it! :) Right now, I only sell one course, called Machine Learning with Text in Python: www.dataschool.io/learn/ But if you want to hear about new courses that I release, just subscribe to my newsletter: www.dataschool.io/subscribe/

  • @rahulduvedi3341
    @rahulduvedi33414 жыл бұрын

    Sir,your content is the best for pandas. Thanks a Lot

  • @kieranbrugman4614
    @kieranbrugman46143 жыл бұрын

    Really great walkthrough, thank you!

  • @dataschool

    @dataschool

    3 жыл бұрын

    My pleasure!

  • @rockspeed2010
    @rockspeed20107 жыл бұрын

    Awesome !! Your explanation is very clear and easy to follow. Keep up the good work !

  • @dataschool

    @dataschool

    7 жыл бұрын

    Thanks for your kind words!

  • @immanuelsuleiman7550
    @immanuelsuleiman75504 жыл бұрын

    Expertly explained. Well done

  • @dataschool

    @dataschool

    4 жыл бұрын

    Thank you!

  • @renevillalta27
    @renevillalta274 жыл бұрын

    Best way to explain, simple and accurate. Thanks

  • @dataschool

    @dataschool

    4 жыл бұрын

    Thank you!

  • @OxanaGafaitiGO
    @OxanaGafaitiGO7 жыл бұрын

    Many thanks for your tutorials. They are powerful. You make complex things easier. Thank you for your work.

  • @dataschool

    @dataschool

    7 жыл бұрын

    Thank so much for your kind comment! I'm glad they are helpful to you!

  • @mylovelykids5795
    @mylovelykids57956 жыл бұрын

    amazing explanation. thanks for your time and patience to educate all.

  • @dataschool

    @dataschool

    6 жыл бұрын

    Glad it was helpful to you!

  • @traveltripfamily7486
    @traveltripfamily74865 жыл бұрын

    You are very good teacher! Congrats!

  • @dataschool

    @dataschool

    5 жыл бұрын

    Thanks!

  • @seshu124
    @seshu1246 жыл бұрын

    The best ever Python site! Many thanks for time and effort !!

  • @dataschool

    @dataschool

    6 жыл бұрын

    You're very welcome!

  • @hkrocksta
    @hkrocksta2 жыл бұрын

    Saved me so much time. Thanks for this !

  • @dataschool

    @dataschool

    2 жыл бұрын

    Great to hear!

  • @venkateshkonangi2353
    @venkateshkonangi23535 жыл бұрын

    Bro... Thanks for your great tutorials. I am beginner. From your videos i could understand the correct concept. Thank you very much.

  • @dataschool

    @dataschool

    5 жыл бұрын

    Great to hear!

  • @srijitapal8100
    @srijitapal81003 жыл бұрын

    you are really a great teacher. It was so easy for me to understand pandas. Thank you so very much.

  • @dataschool

    @dataschool

    2 жыл бұрын

    You're very welcome!

  • @willykitheka7618
    @willykitheka7618 Жыл бұрын

    You're an EXCELLENT TEACHER. Thanks a heap!

  • @dataschool

    @dataschool

    Жыл бұрын

    Thank you! 😃

  • @ajmolinaro
    @ajmolinaro4 жыл бұрын

    Good afternoon. "Long time listener, first time caller." I really like your videos and your teaching style. As others have noted, you explain things clearly and in digestible and understandable chunks, which I appreciate. I have a question and/or a request for Q&A video. I am comparing dataframes. I am using a merge statement and a "fulll outer join". This works well for identifying records from both dataframes that do not match each other. Going a step further, I'd like to identify the individual attributes (i.e., columns) that do not match. My use case is that I often compare extremely wide datasets (200+ columns) and it is sometimes difficult to find the "offending/differing" column(s). I have researched at various places online, and have yet to find a solution that truly fits my needs.

  • @dataschool

    @dataschool

    4 жыл бұрын

    Thanks for your kind words! That's an interesting question, I'm not sure if I 100% understand. It would be super helpful if you could code up a simple example (just a few columns) of what you are currently doing and explain exactly what your goal is. Thanks!

  • @subbuktek
    @subbuktek7 жыл бұрын

    Beautiful teaching technique. You purposefully did it the long way first. Wow!. So the condition that I always used in [ ] in pandas is actually just a Boolean Series whose length matches the length of the dataframe.

  • @dataschool

    @dataschool

    7 жыл бұрын

    Exactly! :)

  • @rprana12777
    @rprana127776 жыл бұрын

    Great teacher, practically my mentor haha

  • @dataschool

    @dataschool

    6 жыл бұрын

    Ha! :)

  • @avallette51
    @avallette51 Жыл бұрын

    I have learned much from your channel. You're a natural for teaching.

  • @dataschool

    @dataschool

    Жыл бұрын

    Wow, thank you so much! I really appreciate your kind words and your contribution!! 🙏

  • @leythecg
    @leythecg4 жыл бұрын

    A really understandable and good explanation!

  • @dataschool

    @dataschool

    3 жыл бұрын

    Glad it was helpful!

  • @xiao2634
    @xiao26346 жыл бұрын

    Like your video. Very detailed and clear step-by-step explanation!

  • @dataschool

    @dataschool

    6 жыл бұрын

    Thanks!

  • @fourten0410
    @fourten04106 жыл бұрын

    Great videos and very clear explanations, thank you!

  • @dataschool

    @dataschool

    6 жыл бұрын

    Thanks!

  • @manojkumarleo
    @manojkumarleo4 жыл бұрын

    loc helped a lot.

  • @Maybe4433
    @Maybe44334 жыл бұрын

    Awesome video, loved the intuitive explanation!

  • @dataschool

    @dataschool

    4 жыл бұрын

    Great to hear!

  • @leandrorberto
    @leandrorberto2 жыл бұрын

    You're an expert!!! Thank you so much!

  • @dataschool

    @dataschool

    2 жыл бұрын

    Thank you!

  • @CivilModules
    @CivilModules5 жыл бұрын

    movies[movies.genre=='Crime'] suppose I want to see both Crime and Action genre, then how to write ?

  • @dataschool

    @dataschool

    5 жыл бұрын

    See this video: kzread.info/dash/bejne/i4R91siKaJrXmrA.html

  • @yashraut9977
    @yashraut99772 жыл бұрын

    Lots of love from India 🙏🙏 you have done a great job sir thank you.

  • @dataschool

    @dataschool

    2 жыл бұрын

    You're welcome!

  • @muradjahangir
    @muradjahangir Жыл бұрын

    Thanks so much! Excellent step by step explanation of the concept and method! Your clear explanation shows how well you have those concepts and logic embedded in you brain 🙂 Must subscribe!

  • @dataschool

    @dataschool

    Жыл бұрын

    Thank you so much, Murad! I really appreciate your kind words, and also for joining as a channel member! 🙏

  • @goingfurther8092
    @goingfurther80922 жыл бұрын

    This was such a good explanation

  • @dataschool

    @dataschool

    2 жыл бұрын

    Thank you!

  • @dianavillescas
    @dianavillescas3 жыл бұрын

    Excellent explanation!! Thank you

  • @dataschool

    @dataschool

    2 жыл бұрын

    You're welcome!

  • @cridelu80
    @cridelu802 жыл бұрын

    such amazing simple explanation!!! thanks you!!!!

  • @dataschool

    @dataschool

    2 жыл бұрын

    You're welcome!

  • @reneebutouy
    @reneebutouy6 жыл бұрын

    You have outstanding skills to teach. Thank you.

  • @dataschool

    @dataschool

    6 жыл бұрын

    You're welcome!

  • @aegystierone8505
    @aegystierone85054 жыл бұрын

    Never knew loc is a powerful filter tool!

  • @RufusVidS
    @RufusVidS6 жыл бұрын

    Your series is terrific, only one issue, as has been mentioned before in these comments: "boolean" has 3 syllables.

  • @dataschool

    @dataschool

    5 жыл бұрын

    Glad you like the videos!

  • @Yodad0110
    @Yodad0110 Жыл бұрын

    Great video!! Helped me a lot!

  • @dataschool

    @dataschool

    Жыл бұрын

    Glad it helped!

  • @TR3NDSETR
    @TR3NDSETR4 жыл бұрын

    Another fantastic video, Im so used to the 8-9 min vidoes now , 13+mins was a bit intense :)

  • @dataschool

    @dataschool

    4 жыл бұрын

    Thank you so much!

  • @MrMukulpandey
    @MrMukulpandey Жыл бұрын

    Great explanation as always

  • @dataschool

    @dataschool

    Жыл бұрын

    Thanks!

  • @tasneemhegde9588
    @tasneemhegde95883 жыл бұрын

    You are an amazing teacher.... So clear and so succinct

  • @dataschool

    @dataschool

    2 жыл бұрын

    Thank you!

  • @mkoc2071
    @mkoc20715 жыл бұрын

    That is so powerful explanation! Thank you!

  • @dataschool

    @dataschool

    5 жыл бұрын

    You're very welcome!

  • @brijkishortiwari2077
    @brijkishortiwari20773 жыл бұрын

    Thank you very much sir for all your videos. its really a great experience and help to learn many things.

  • @dataschool

    @dataschool

    3 жыл бұрын

    Thanks!

  • @Jonas89offsuit
    @Jonas89offsuit5 жыл бұрын

    Boolean is three syllables. Thanks for your videos!

  • @dataschool

    @dataschool

    5 жыл бұрын

    You are very welcome!

  • @robindong3802
    @robindong38026 жыл бұрын

    Very good tutorials. Thanks.

  • @dataschool

    @dataschool

    6 жыл бұрын

    Thanks for your comment!

  • @JustinLeu1
    @JustinLeu17 жыл бұрын

    Awesome breakdown and explanation, thanks!

  • @dataschool

    @dataschool

    7 жыл бұрын

    You're very welcome!

  • @LonglongGuitar
    @LonglongGuitar7 жыл бұрын

    this is quite in depth explaining~~~awesome

  • @dataschool

    @dataschool

    7 жыл бұрын

    Thanks!

  • @vivekprajapati489
    @vivekprajapati4894 жыл бұрын

    thanks. was great help 1 points if u can tell: how to use multiple condition in the the data frame and select multiple columns of the same date frame

  • @juanmarcusfabregas3139
    @juanmarcusfabregas31392 жыл бұрын

    Lifesaver, i can't thank you enough!!!

  • @dataschool

    @dataschool

    2 жыл бұрын

    You're very welcome!

  • @Sureshezhumalai
    @Sureshezhumalai5 жыл бұрын

    Great explanation!!!

  • @dataschool

    @dataschool

    5 жыл бұрын

    Thanks!

  • @TalesFromTheCollection
    @TalesFromTheCollection5 жыл бұрын

    This was a great explanation! Thanks.

  • @dataschool

    @dataschool

    5 жыл бұрын

    You're welcome!

  • @thomasquer452
    @thomasquer4524 жыл бұрын

    I felt like my dog could understand this. Thank you

  • @asneogy
    @asneogy8 жыл бұрын

    Hi Kevin! Thank you so much for the .loc tip! I was finally able to solve one of the things that annoyed me the most: assigning values to a new column based on values in one or more existing columns :) I sometimes prefer using .ix rather than .loc, since .ix is a flexible wrapper over .loc and can handle both label and numeric row selections. The syntax is strangely reminiscent of the R data,table [i, j, by] format, which I find very handy. Thanks again!

  • @dataschool

    @dataschool

    8 жыл бұрын

    You're very welcome! I will have a video about loc/iloc/ix in the next few weeks :)

  • @asneogy

    @asneogy

    8 жыл бұрын

    excellent - looking forward to it!

  • @dataschool

    @dataschool

    8 жыл бұрын

    Here is my brand new video about loc/iloc/ix: kzread.info/dash/bejne/qqqksKNwkqaek9Y.html Enjoy! :)

  • @dataschool

    @dataschool

    8 жыл бұрын

    You might also find my latest video to be useful, about the SettingWithCopy warning: kzread.info/dash/bejne/ZoZoudV9epCxhsY.html

  • @grchoudhary5259
    @grchoudhary52599 ай бұрын

    your way of teaching is awesome!!!!! Thanks bro

  • @dataschool

    @dataschool

    8 ай бұрын

    Thank you so much! 🙌

  • @chinmoly6428
    @chinmoly64285 жыл бұрын

    movies[movies.duration>=200]

  • @mattymallz4207

    @mattymallz4207

    4 жыл бұрын

    Thanks Molly!

  • @asgaraliyev8740

    @asgaraliyev8740

    4 жыл бұрын

    how can i do this by removing NaN

  • @mehranzand2873
    @mehranzand28734 жыл бұрын

    what a teacher, thanks.

  • @dataschool

    @dataschool

    4 жыл бұрын

    Thanks!

  • @flexfpv1707
    @flexfpv17075 жыл бұрын

    This is very helpful! Your accent is so clear and it's very easy to understand you. Thanks!

  • @dataschool

    @dataschool

    5 жыл бұрын

    Thanks!

  • @trevorbrown9871
    @trevorbrown98716 жыл бұрын

    glad I found your channel!

  • @dataschool

    @dataschool

    6 жыл бұрын

    Glad you like it! :)

  • @LOL-vt8jh
    @LOL-vt8jh3 жыл бұрын

    Very clear! Thank you.

  • @dataschool

    @dataschool

    2 жыл бұрын

    Glad it was helpful!

  • @lonathompson1635
    @lonathompson16356 жыл бұрын

    pandasDoc < dataSchool = True

  • @dataschool

    @dataschool

    6 жыл бұрын

    Ha! Thanks :)

  • @giangtu6000
    @giangtu60003 жыл бұрын

    Wow. Great video!

  • @techy0716
    @techy07163 жыл бұрын

    Awesome. Thanks for explaining concept in details. Gr8 work. Thanks.

  • @dataschool

    @dataschool

    2 жыл бұрын

    You're welcome!

  • @VariaAmore
    @VariaAmore3 жыл бұрын

    Thank you so much, it was a lot of help!

  • @dataschool

    @dataschool

    3 жыл бұрын

    Glad it helped!