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

Sdílet
Vložit
  • čas přidán 24. 07. 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

Komentáře • 375

  • @coreyms
    @coreyms  Před 4 lety +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 Před 4 lety +3

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

    • @ianyune3066
      @ianyune3066 Před 4 lety +1

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

    • @marcoantonio7648
      @marcoantonio7648 Před 4 lety

      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 Před 4 lety +1

      @Soya Ashida He uses Sublime Text. In this video he walks through the set up czcams.com/video/xFciV6Ew5r4/video.html

    • @garvitkumar3013
      @garvitkumar3013 Před 4 lety

      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 Před 4 lety +144

    I keep the ads running because you earn it!

  • @floriankoller5190
    @floriankoller5190 Před 4 lety +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 Před 2 lety +5

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

  • @Aaronisification
    @Aaronisification Před 3 lety +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 Před 3 lety +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.

  • @sharmakartikeya
    @sharmakartikeya Před 3 lety +15

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

  • @joshliao00607
    @joshliao00607 Před rokem +11

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

  • @ammarkhawer7807
    @ammarkhawer7807 Před 4 lety +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 Před 3 lety +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.

  • @rizwan1220
    @rizwan1220 Před 3 lety +9

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

  • @sherifelgamal8686
    @sherifelgamal8686 Před 4 lety +4

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

  • @reetamchatterjee2179
    @reetamchatterjee2179 Před 4 lety +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 Před 4 lety +1

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

  • @modernmistyk4341
    @modernmistyk4341 Před 4 lety +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 Před 3 lety +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 !!

  • @godswillikwan8769
    @godswillikwan8769 Před 4 lety +3

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

  • @arslan809
    @arslan809 Před 3 lety

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

  • @orie239
    @orie239 Před 4 lety +2

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

  • @stephanie_ong
    @stephanie_ong Před 4 lety +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.

  • @AnselmoBattisti
    @AnselmoBattisti Před 3 lety +1

    This approach with the rows and columns is pure genius!

  • @sahilsondhi3143
    @sahilsondhi3143 Před 5 měsíci +1

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

  • @midorixi
    @midorixi Před 4 lety +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 Před 3 lety +1

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

  • @jorgezarate4504
    @jorgezarate4504 Před 3 lety +1

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

  • @arellando050592
    @arellando050592 Před 3 lety +1

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

  • @jessicasanger7194
    @jessicasanger7194 Před 4 lety +13

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

  • @wolfisraging
    @wolfisraging Před 4 lety +17

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

  • @TheBIMCoordinator
    @TheBIMCoordinator Před 4 lety +2

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

  • @MANISH12665
    @MANISH12665 Před 21 dnem

    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 .

  • @c0nsumption
    @c0nsumption Před 2 lety

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

  • @kumarsamir1929
    @kumarsamir1929 Před rokem +1

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

  • @spasbeautiful
    @spasbeautiful Před rokem

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

  • @sarajantas838
    @sarajantas838 Před rokem

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

  • @pooppooooify
    @pooppooooify Před 2 lety

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

  • @sid9137
    @sid9137 Před 2 lety

    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!

  • @180_gram_vinyl
    @180_gram_vinyl Před 4 lety +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  Před 4 lety +6

      Great point! Forgot to mention that. Thanks!

    • @BiancaAguglia
      @BiancaAguglia Před 4 lety +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 Před rokem

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

  • @soumyajitdey5720
    @soumyajitdey5720 Před 4 lety +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!

  • @saheelahmed206
    @saheelahmed206 Před 3 lety +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 🔥🔥

  • @cuckoo_is_singing
    @cuckoo_is_singing Před rokem

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

  • @sridharathani5038
    @sridharathani5038 Před 3 lety

    Amazing ! He never squeezes the concepts , Beautiful explaination !

  • @obumjohnokafor6899
    @obumjohnokafor6899 Před 9 měsíci

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

  • @balogunanuoluwapo7281
    @balogunanuoluwapo7281 Před rokem +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 Před rokem

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

  • @jefflee6567
    @jefflee6567 Před 2 lety

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

  • @tav9755
    @tav9755 Před 3 lety

    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!

  • @raychen4458
    @raychen4458 Před 4 lety +2

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

  • @user-fq2nd8nw6f
    @user-fq2nd8nw6f Před 4 lety

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

  • @johnpoc6594
    @johnpoc6594 Před 2 lety

    This tutorial series is amazing Corey, thank you!

  • @just_a_viewer5
    @just_a_viewer5 Před 2 měsíci

    thank you for these lessons Corey!

  • @markkennedy9767
    @markkennedy9767 Před 8 měsíci

    Great stuff, Corey. Very clear. Thanks

  • @1960oiram
    @1960oiram Před 4 lety +1

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

  • @davebeckham5429
    @davebeckham5429 Před 4 lety +2

    Excellent tutorial Corey as usual. - Many thanks

  • @gaganik
    @gaganik Před 2 lety

    whole videos in this series are incredible! you are awesome

  • @julientremblaymclellan4894

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

  • @crackyflipside
    @crackyflipside Před 4 lety +1

    loving the series so far!!!

  • @ekaansmohanty3272
    @ekaansmohanty3272 Před 4 lety +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

  • @krishnakiranvajha3175
    @krishnakiranvajha3175 Před 3 lety

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

  • @paulohsgoes1959
    @paulohsgoes1959 Před rokem +1

    Excellent job. Congrats!

  • @rjs2583
    @rjs2583 Před 4 lety +1

    by far the best series about pandas

  • @galaxyhomehealthservices9898

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

  • @peterluo1776
    @peterluo1776 Před rokem

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

  • @md.niazulislamroky4144
    @md.niazulislamroky4144 Před 7 měsíci

    this is the most satisfying pandas playlist!

  • @crystalchaung1576
    @crystalchaung1576 Před rokem

    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.

  • @finncollins5696
    @finncollins5696 Před rokem

    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..

  • @akira_asahi
    @akira_asahi Před rokem +1

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

  • @why4han5lr7
    @why4han5lr7 Před 3 lety

    perfect pandas tutorial ever in youtube and even on internet

  • @shantanukaushikmathoholic
    @shantanukaushikmathoholic Před 4 měsíci

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

  • @MrJeeoSoft
    @MrJeeoSoft Před 2 lety

    Excellent tutorial Corey!

  • @cephasmusafiri8667
    @cephasmusafiri8667 Před 6 měsíci

    This is very helpful. Thanking for your tutorials.

  • @joeyzalman8254
    @joeyzalman8254 Před 2 lety +1

    super clear, thank you!

  • @alexanderburlingame3161
    @alexanderburlingame3161 Před 4 lety +1

    So helpful, thank you Corey!

  • @jiangxu3895
    @jiangxu3895 Před 4 lety +5

    hey Corey, I cannot resist to say thank you for this video. This solved many of my presious ambiguous understanding of Pandas. Very helpful!!

  • @weihua44
    @weihua44 Před rokem

    This video series is awesome!

  • @codewithluq
    @codewithluq Před 4 lety +1

    Thank you Corey. Great skill and great knowledge

  • @teetanrobotics5363
    @teetanrobotics5363 Před 4 lety +6

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

  • @bitcointrader8586
    @bitcointrader8586 Před 4 lety +1

    Great video dude, always on point.

  • @Diego-Desde-Argentina
    @Diego-Desde-Argentina Před 6 měsíci

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

  • @SumitGupta-ys7lb
    @SumitGupta-ys7lb Před 4 měsíci +2

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

  • @diegooliveira7713
    @diegooliveira7713 Před 8 měsíci

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

  • @bhavyapatel1089
    @bhavyapatel1089 Před měsícem

    Brother, thank you for all the videos.

  • @prasathj7436
    @prasathj7436 Před 3 lety

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

  • @usmonov_dev
    @usmonov_dev Před 4 lety +1

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

  • @jariuslouie
    @jariuslouie Před 4 lety +9

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

    • @KshitijKale
      @KshitijKale Před 4 lety

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

    • @vatsalgupta00
      @vatsalgupta00 Před 4 lety +1

      @@KshitijKale Andrew Yang's course is pretty good. czcams.com/video/PPLop4L2eGk/video.html

    • @alexbordei3951
      @alexbordei3951 Před 4 lety

      @@vatsalgupta00 honestly thought it was the former candidate.

  • @najobsodar7528
    @najobsodar7528 Před 3 měsíci +1

    Well explained!, many thanks

  • @1976turkish
    @1976turkish Před 2 lety

    crisp clear thank you

  • @coreysparks9916
    @coreysparks9916 Před 3 lety

    This is extremely useful!

  • @patrickwheeler1979
    @patrickwheeler1979 Před rokem

    This was very informative, thanks.

  • @byronrau6956
    @byronrau6956 Před 4 lety +1

    Great video series. Very helpful, thank you!

  • @adityabhargava6331
    @adityabhargava6331 Před 2 lety

    Really Helpful Series both as a refresher and for a beginner.

  • @vladimirbosinceanu5778

    Amazing as always. Thank you!

  • @fabianabecatini6743
    @fabianabecatini6743 Před rokem +1

    Great video! Thanks

  • @vaibhavkrkm
    @vaibhavkrkm Před 4 lety

    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!!

  • @TheJokilly1
    @TheJokilly1 Před 3 lety

    Beginning with the dictionary of list, 👌 spot on helps.

  • @coreycarter5668
    @coreycarter5668 Před 4 lety +3

    Pandas makes data analysis easy and Corey makes pandas easy!

  • @qasimzaheer1140
    @qasimzaheer1140 Před 3 lety

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

  • @jobyjoseph3809
    @jobyjoseph3809 Před 4 lety +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.

  • @kingler199
    @kingler199 Před 2 lety

    The quick taste to the power of pandas was delicious.

  • @Yasharvl
    @Yasharvl Před 4 lety

    Oh my! Best news = the moment when you find "your next big topic to learn" here!

  • @saiyam2509
    @saiyam2509 Před 2 lety

    Another challenge made so simple to learn. Thanks

  • @pranavpatki
    @pranavpatki Před 4 lety +1

    Three words: 'Amazing. Thank you'.

  • @rencerivera9171
    @rencerivera9171 Před rokem

    best panda tutorial!

  • @wiktoriarajewicz3775
    @wiktoriarajewicz3775 Před rokem

    I can't believe I just watched this for free. Great job!