Python Pandas Tutorial (Part 2): DataFrame and Series Basics - Selecting Rows and Columns

Поделиться
HTML-код
  • Опубликовано: 21 июл 2024
  • In this video, we will be learning about the Pandas DataFrame and Series objects.
    This video is sponsored by Brilliant. Go to brilliant.org/cms to sign up for free. Be one of the first 200 people to sign up with this link and get 20% off your premium subscription.
    In this Python Programming video, we will be learning about the DataFrame and Series objects. These are the backbone of Pandas and are fundamental to the library. DataFrames can be thought of as rows and columns, while a Series can be thought of as just a single column of rows. We'll also learn the basic navigation of these datatypes by learning how to select specific rows and columns. Let's get started...
    The code for this video can be found at:
    bit.ly/Pandas-02
    StackOverflow Survey Download Page - bit.ly/SO-Survey-Download
    ✅ Support My Channel Through Patreon:
    / coreyms
    ✅ Become a Channel Member:
    / @coreyms
    ✅ One-Time Contribution Through PayPal:
    goo.gl/649HFY
    ✅ Cryptocurrency Donations:
    Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
    Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
    Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot
    ✅ Corey's Public Amazon Wishlist
    a.co/inIyro1
    ✅ Equipment I Use and Books I Recommend:
    www.amazon.com/shop/coreyschafer
    ▶️ You Can Find Me On:
    My Website - coreyms.com/
    My Second Channel - / coreymschafer
    Facebook - / coreymschafer
    Twitter - / coreymschafer
    Instagram - / coreymschafer
    #Python #Pandas

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

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

    I hope everyone finds this helpful! I will be releasing the 3rd video of the series on Monday. The next video will be on indexes. Indexes are very useful once we get the hang of them, so be sure to check that out. I hope everyone has a great weekend!
    I'd like to thank Brilliant for sponsoring this series. If you'd like to check them out then you can sign up with this link and get 20% off your premium subscription:
    brilliant.org/cms

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

      You're a very good teacher, wish you had more time to do all the packages/libraries lmao.

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

      Love your lectures. Can't wait for the 3rd video! Thank you so much.

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

      Even when I'm not that interest in the content, I still watch your videos and learn something new.
      Looking for the day when you're teaching about async code. Like, real deep on "what is happening and how".

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

      @Soya Ashida He uses Sublime Text. In this video he walks through the set up ruclips.net/video/xFciV6Ew5r4/видео.html

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

      Hi Corey, thankyou so much for your hard work and wonderful videos. I want to learn Machine Learning but I am confused from where to start and what I need to learn. Can you please make videos on machine learning as well. I don't want to watch other videos because you are the best. hoping for a reply. Thanks

  • @aegystierone8505
    @aegystierone8505 4 года назад +143

    I keep the ads running because you earn it!

  • @floriankoller5190
    @floriankoller5190 4 года назад +261

    i really like the way you present information...many others just squeeze everything into one unorganized video, but you really take your time to explain every step in plain understandable english so everyone can follow...i think many teachers can learn from your way of presenting!
    I really want to thank you for creating such beautiful content!

    • @ShawnDypxz
      @ShawnDypxz 2 года назад +5

      He is a superstar. I wish he had made videos on Numpy as well.

  • @Aaronisification
    @Aaronisification 3 года назад +142

    8:23 - access a single column via string()
    11:25 - dot notation
    13:31 - access multiple COLUMNS- pass in a list() of the columns you want.
    15:23 - list all the columns - df.columns
    14:40 - access ROWS with loc and iloc -- loc is for labels, iloc is for integers.
    20:49 - use two lists, one for the ROWS and another, second list, for COLUMNS to get a subset of the DataFrame.

  • @rhys87
    @rhys87 3 года назад +33

    Not only does he explains things well, I think he was trained/taught well because you can see that he does most things the most simple and efficient way most of the time. Really helps to understand the basics without a lot of noise around to confuse at the start. Best teacher I have come across in teaching Python.

  • @rizwan1220
    @rizwan1220 3 года назад +9

    You are the best teacher that i have ever seen. Even our uni professors failed to teach like you. hats off to you

  • @sharmakartikeya
    @sharmakartikeya 3 года назад +15

    Hands down the best dedicated pandas tutorial on RUclips for me. I like knowing most of the things before jumping in so this is like the Holy Grail for me for Pandas

  • @ammarkhawer7807
    @ammarkhawer7807 4 года назад +19

    Beautiful work youre doing there mate!! Did mention how i am enrolled in few courses for the understanding of data analysis , but as soon as i came across your tutorials i knew i that i wont be searching no more. Brilliant hands on approach to data analysis with pandas

  • @ZahidHasan-cc8tf
    @ZahidHasan-cc8tf 3 года назад +3

    Seriously!! This is one of its kind tutorials that I enjoy following and learning from. I actually wish that the video doesn't end. You don't teach us just basic stuff but gradually from beginning to advanced in such a subtle way that even a beginner like me can follow without any difficulty.

  • @joshliao00607
    @joshliao00607 Год назад +11

    You literally made a series of videos covering my whole exam. So grateful to having these.

  • @sherifelgamal8686
    @sherifelgamal8686 4 года назад +4

    Thanks a lot for this series! This the most complete and easy to understand python tutorial i have seen. Great work!

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

    Hey Corey! I just wanna say "THANK YOU" cause your tutorials have helped in understanding python and learning important libraries!! Keep doing the good work!! You explain complex things so simply...... I love it. Thanks again for all your help!!

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

    I am so glad you are uploading the pandas series so frequently. Thankyou very much and keep up the good work.

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

    As an aside, this is probably one of the most interesting topics to make a video series on with python. I'm imagining all the unbelievable things we can learn using this increedible tool. Please keep this series running, I'd love to see you do some really interesting experiments with this data, or some interesting data period.

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

    just know it bro you are legend for people like us !! i have seen lots of tutorials videos but no one is close you ...God bless you with everything !!

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

    Great video, really easy to listen to and has a great format. I look forward to the rest of these.

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

    The best channel for python in RUclips by far ... love your videos!

  • @balogunanuoluwapo7281
    @balogunanuoluwapo7281 Год назад +16

    I'm a Nigerian and an aspiring data scientist. Your video has really helped me understand better the basics of pandas . I just want to say thank you too. And you'd surely be a part of my success story when I eventually pull through. Cos I still have a lot to learn really . But this basics and working with real life projects is very very encouraging

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

      Hello Aanu, I would like to connect with you and rub mind together. I'm an aspiring data scientist too

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

    Thank you so much Corey Schafer, your teaching series are definitely going to help mould me into the developer I wanna become

  • @midorixi
    @midorixi 4 года назад +4

    This series of videos about pandas are very well written. Thank you for the quality of your contents, I am super happy to learn to use pandas and Python with you :)

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

      I feel like I now have the literacy to understand other online resources.

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

    Far better than all the paid courses, the best content I ever found on web

  • @180_gram_vinyl
    @180_gram_vinyl 4 года назад +29

    Great video, Corey. Another reason to use bracket notation instead of dot notation to access columns is in case you have column names that contain spaces. Dot notation won’t work if that is the case, so as you recommended, it’s just easier to use bracket notation because it’s less to worry about.

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

      Great point! Forgot to mention that. Thanks!

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

      The advantage of dot notation is that it's more convenient. When you clean your data and do some initial explorations and transformations, you do a lot of column selections and dot notation can quickly become a nuisance. If your columns have names that might give you errors, it's faster to rename them and use dot notation than it is to use bracket notation. At least, that's how I feel about it. 😊

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

      This is a good reason. I think conflicts between column name and method is not right because methods have parentheses.

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

    Corey Schafer, you are the best and I've learnt Python from scratch just by following your lectures.
    Thank you for the lectures.

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

    This approach with the rows and columns is pure genius!

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

    Been watching your videos for years man. Finally got my first Python job. Can’t thank you enough. Knocking out this series this week :)

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

    Thank you so much for this series. I am looking to convert a huge excel workbook with various calculations to a python script and it involves a lot of data processing. I am exploring pandas and this series has been really helpful so far.

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

    Thank you Brilliant for sponsoring such great educational videos from Corey!

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

    I really dont understand why you have less subscribers. Your content and knowledge is outstanding I really love your tutorials. I have learnt many things from your channel 🔥🔥

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

    You are a terrific teacher, can't wait to watch your other videos. Thank you!

  • @obumjohnokafor6899
    @obumjohnokafor6899 9 месяцев назад

    you are a talented teacher Corey, keep it up! I will always support your channel in anyway possible. Thanks!

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

    Hey Corey! Just wanted to appreciate your efforts and talent man! You are catering to educating thousands out there and this is education in the truest sense. Keep up the good work!
    P.S- Also if you could do a series on Machine Learning, Neural Networks, Deep Leaning

  • @MANISH12665
    @MANISH12665 18 дней назад

    Thank you so much for the tutorial its probably the best tutorial available in You tube for pandas .I am not skipping any ads played during the lecture .

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

    This series is no doubt gonna be the best series for 🐼
    Just can't wait for more videos

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

    Really great tutorial Corey. I am a newbie to the stuff but your explaining is great to follow along. Keep on the great work. Cheers!

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

    DataFrame looks similar to views in SQL Databases. You get a small portion of the whole data as needed and manipulate that. Great tutorial as usual Corey!

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

    Corey you are the GOAT when it comes to python tutorials. love your work!

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

    Thank you, Corey Schafer. your videos are so easy to understand and helping me to learn Pandas

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

    Thank you for explaining python in easy words. Your lectures are very well scripted and provide very good information. Thanks for your hard work!

  • @jessicasanger7194
    @jessicasanger7194 4 года назад +13

    Thank you so much Corey!!
    As always well structured with relevant examples.
    Keep up the good work. ☺️

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

    Could you please make a complete playlist on machine learning with Python ? We would love to watch it .

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

    Thanks Corey! This video is really useful, especially for someone learning python and Pandas for specific project.

  • @just_a_viewer5
    @just_a_viewer5 2 месяца назад

    thank you for these lessons Corey!

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

    Thanks man, your tutorials are really helpful and I can confidently rely on them to get myself upskilled and find a job in the market. Thanks a lot!

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

    I was really stuck with the selecting rows and columns... but now I have a better understanding. Great video!

  • @1960oiram
    @1960oiram 4 года назад +1

    Thank you so much Corey, really clear and very easy to learn. Subscribed.

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

    Amazing ! He never squeezes the concepts , Beautiful explaination !

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

    Excellent tutorial Corey as usual. - Many thanks

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

    perfect
    watching your videos is the best experience I've ever had, brilliant. tnx to make python easy to learn

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

    Hi Corey,
    You have done a wonderful job on all these videos.
    Can you do few videos on machine learning, deep learning, NLP and neural network please.

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

    one of the best teachers on the web! just needs to include more documentation in his videos

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

    One clarification here, if you do slicing using iloc, the end index is not inclusive, that is, if you run a command df.iloc[0:2, 1], this would return only the first 2 rows (works just like core Python). Whereas in case of loc, it returns the end index (returns all 3 rows for above example), which is very well explained by Corey.

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

    Thank you. The amount of content with no breaks and medium-slow speaking speed as well as the illustration helped. I was about to make plots thinking no one had published a good explanation of the difference between dataframe and series in an easy-to-understand example. I like how we started off with, why not use Python dictionaries with lists? to get to pandas dataframe.

  • @markkennedy9767
    @markkennedy9767 8 месяцев назад

    Great stuff, Corey. Very clear. Thanks

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

    This tutorial series is amazing Corey, thank you!

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

    whole videos in this series are incredible! you are awesome

  • @user-fq2nd8nw6f
    @user-fq2nd8nw6f 4 года назад

    I will merely heap praise on an already mountainous pile. You are the best out there. By a very long stretch.

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

    Great stuff man! You deserve way more views. Cheers!

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

    Excellent tutorial Corey!

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

    loving the series so far!!!

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

    You are the best teacher Corey !! Thank you for doing this for community !

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

    Very cool explanation 👍
    I have noticed something by the way :) , whenever I use a list inside the brackets for multiple values or even a single value (either acquiring columns or rows), it gives us the output as a data frame, but when we do it directly for a single value without using list brackets (square brackets), it gives us the information in a different way, just like a description output or something which is called a series data type as you explained!!

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

    The best explanation ever for complete beginner like me, big thanks to you, siR

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

    Pandas makes data analysis easy and Corey makes pandas easy!

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

    I thought this tutorial was excellent.
    Despite having prior Knowledge but the video is just so awesome.
    Thanks for sharing the good work.

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

    Excellent job. Congrats!

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

    You have great teaching style . Concise and clear thank you.

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

    best video series. i started yesterday. And am planning to continue all the 11 videos. thanks a lot. this freee course means a lot to me. thanks..

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

    Hi Corey thank you so much for posting these videos. Your tutorials have helped me transition the concepts I know into actual useful code. I would like to test my progress and would really appreciate if you can put out a link with some data analysis projects (i.e. a database to download, questions to answer using data analysis, and the code that was written to answer those questions).
    Thank you so much and keep the videos coming you're an amazing teacher!!

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

    Thank you for the video. I am grateful for your time and contribution. Kind regards, Akira.

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

    by far the best series about pandas

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

    So helpful, thank you Corey!

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

    This is very helpful. Thanking for your tutorials.

  • @jariuslouie
    @jariuslouie 4 года назад +9

    I never skip an ad as my way of saying thank you 😁

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

      Your devotion has been recorded -
      btw, do you happen to know any useful machine learning resources like these video tutorials?

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

      @@KshitijKale Andrew Yang's course is pretty good. ruclips.net/video/PPLop4L2eGk/видео.html

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

      @@vatsalgupta00 honestly thought it was the former candidate.

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

    Hey Corey!! Hope you are having a great day and if not, I hope it becomes that soon. Really appreciate your videos, as a beginner this channel is like a treasure of the seven seas:)
    Just wanted to make a request, if possible can you also upload a series like this for Machine Learning tools/techniques like Linear Regression, Logistic Regression, etc. My apologies if I didn't sound techincally correct.
    Thankyou so much again for such a wonderful series.

  • @avinashpandey6491
    @avinashpandey6491 4 года назад +26

    Thank you. can you also do a series on GUI perhaps with Qt.

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

    Even after 4 years past, this series is just perfect...Thanks for it.

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

    Great video dude, always on point.

  • @Diego-Desde-Argentina
    @Diego-Desde-Argentina 6 месяцев назад

    Thank you, very organized and well explained! Keep the great work!

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

    Clear and useful tutorial, thank you, Corey Schafer ;)

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

    Great lesson! Thank you!

  • @diegooliveira7713
    @diegooliveira7713 8 месяцев назад

    Thank you! Very clear and informative. Keep up the good work!

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

    super clear, thank you!

  • @msaadmahmood2558
    @msaadmahmood2558 7 месяцев назад

    I have basic understanding of pandas, sometimes I am reluctant to forwarding video because every word coming out of you is useful❤

  • @najobsodar7528
    @najobsodar7528 3 месяца назад +1

    Well explained!, many thanks

  • @md.niazulislamroky4144
    @md.niazulislamroky4144 7 месяцев назад

    this is the most satisfying pandas playlist!

  • @raheemaslam6748
    @raheemaslam6748 2 года назад +2

    If teaching is an art , Corey is the pikaso

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

    Thank you Corey. Great skill and great knowledge

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

    perfect pandas tutorial ever in youtube and even on internet

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

    Great video series. Very helpful, thank you!

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

    This video series is awesome!

  • @SumitGupta-ys7lb
    @SumitGupta-ys7lb 4 месяца назад +2

    One of the best starters, just pulled me into pandas :)

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

    Amazing as always. Thank you!

  • @bhavyapatel1089
    @bhavyapatel1089 Месяц назад

    Brother, thank you for all the videos.

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

    Thanks Corey for your videos. One of the best or the best so far !!!

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

    İ bought sone courses on udemy. but your courses so much better !! i am happy that finally i found a place where i can learn the programming decently

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

    This was very informative, thanks.

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

    Another great series on our Netflix channel :)
    Thank you so much for this Corey.
    If I want to explore more about data analysis after this course, perhaps statistics, which specific course would you recommend?

  • @AllRounder-km3lh
    @AllRounder-km3lh 2 года назад

    I visit every ad playing on your video so u will get more $. U deserve it.

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

    Thank you thank you thank you soooooo much!!!!! This was so helpful!!!! You're a blessing!!! :)

  • @1976turkish
    @1976turkish 2 года назад

    crisp clear thank you