ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก
Python Pandas Tutorial (Part 2): DataFrame and Series Basics - Selecting Rows and Columns
ฝัง
- เผยแพร่เมื่อ 18 ส.ค. 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-Surve...
✅ 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...
▶️ You Can Find Me On:
My Website - coreyms.com/
My Second Channel - / coreymschafer
Facebook - / coreymschafer
Twitter - / coreymschafer
Instagram - / coreymschafer
#Python #Pandas
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
You're a very good teacher, wish you had more time to do all the packages/libraries lmao.
Love your lectures. Can't wait for the 3rd video! Thank you so much.
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".
@Soya Ashida He uses Sublime Text. In this video he walks through the set up th-cam.com/video/xFciV6Ew5r4/w-d-xo.html
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
I keep the ads running because you earn it!
Sfd eh ean415
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!
He is a superstar. I wish he had made videos on Numpy as well.
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.
Praise and glory be upon thou, oh the unsung hero of the comment section!
you are a hero
@@fernando99atb me? Thanks sire
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.
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
Hello Aanu, I would like to connect with you and rub mind together. I'm an aspiring data scientist too
You are the best teacher that i have ever seen. Even our uni professors failed to teach like you. hats off to you
You literally made a series of videos covering my whole exam. So grateful to having these.
Hands down the best dedicated pandas tutorial on TH-cam for me. I like knowing most of the things before jumping in so this is like the Holy Grail for me for Pandas
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.
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
Far better than all the paid courses, the best content I ever found on web
Thank you very much! This is the only course where i understand completely about how this library works.
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.
Great point! Forgot to mention that. Thanks!
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. 😊
This is a good reason. I think conflicts between column name and method is not right because methods have parentheses.
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.
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 !!
This series is no doubt gonna be the best series for 🐼
Just can't wait for more videos
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 .
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 🔥🔥
Pandas makes data analysis easy and Corey makes pandas easy!
This approach with the rows and columns is pure genius!
I never skip an ad as my way of saying thank you 😁
Your devotion has been recorded -
btw, do you happen to know any useful machine learning resources like these video tutorials?
@@KshitijKale Andrew Yang's course is pretty good. th-cam.com/video/PPLop4L2eGk/w-d-xo.html
@@vatsalgupta00 honestly thought it was the former candidate.
The best channel for python in TH-cam by far ... love your videos!
Corey Schafer, you are the best and I've learnt Python from scratch just by following your lectures.
Thank you for the lectures.
I am so glad you are uploading the pandas series so frequently. Thankyou very much and keep up the good work.
Been watching your videos for years man. Finally got my first Python job. Can’t thank you enough. Knocking out this series this week :)
Thanks a lot for this series! This the most complete and easy to understand python tutorial i have seen. Great work!
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 :)
I feel like I now have the literacy to understand other online resources.
Even after 4 years past, this series is just perfect...Thanks for it.
İ 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
I visit every ad playing on your video so u will get more $. U deserve it.
One of the best starters, just pulled me into pandas :)
Thank you for the video. I am grateful for your time and contribution. Kind regards, Akira.
Part 1: Using a Dictionary
3:05 What is a DataFrame
3:32 Using Dictionary to store information
6:57 Create a DataFrame from Dictionary
8:22 Access a single column using brackets
13:29 Access multiple columns using brackets
15:59 Access a single row using iloc
17:11 Access multiple rows using iloc
17:50 Access columns and rows using iloc
19:45 Access a single row using loc
20:08 Access multiple rows using loc
20:44 Access columns and rows using loc
Part 2: Using a Dataset
23:05 See how many rows and columns
23:05 See all columns name
25:17 Count unique values
28:48 Using slicing
So what...?
one of the best teachers on the web! just needs to include more documentation in his videos
I have basic understanding of pandas, sometimes I am reluctant to forwarding video because every word coming out of you is useful❤
by far the best series about pandas
perfect
watching your videos is the best experience I've ever had, brilliant. tnx to make python easy to learn
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.
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.
Thank you so much Corey Schafer, your teaching series are definitely going to help mould me into the developer I wanna become
You are a terrific teacher, can't wait to watch your other videos. Thank you!
I was really stuck with the selecting rows and columns... but now I have a better understanding. Great video!
Thank you, Corey Schafer. your videos are so easy to understand and helping me to learn Pandas
I thought this tutorial was excellent.
Despite having prior Knowledge but the video is just so awesome.
Thanks for sharing the good work.
Could you please make a complete playlist on machine learning with Python ? We would love to watch it .
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.
I will merely heap praise on an already mountainous pile. You are the best out there. By a very long stretch.
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!!
The best explanation ever for complete beginner like me, big thanks to you, siR
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!
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..
i don't know if it's a bug or it's intentional (certainly it's confusing), but df.iloc[0:2] will return you rows 0 and 1 but not 2, whereas df.loc[0:2] will return you rows 0, 1 and 2.
edit. oh, i get it now. when i use df.iloc[0:2] i'm working on integers 0, 1 and 2 and therefore python logic of inclusive:exclusive applies. however when i'm using df.loc[0:2] i'm working on labels '0,' '1' and '2' and therefore language logic of inclusive:inclusive applies, as in "I'm working from Monday to Friday." means that i'm working on Friday as well.
The quick taste to the power of pandas was delicious.
Corey you are the GOAT when it comes to python tutorials. love your work!
Thank you Brilliant for sponsoring such great educational videos from Corey!
Thank you for explaining python in easy words. Your lectures are very well scripted and provide very good information. Thanks for your hard work!
Amazing ! He never squeezes the concepts , Beautiful explaination !
Thank you so much Corey!!
As always well structured with relevant examples.
Keep up the good work. ☺️
If teaching is an art , Corey is the pikaso
Excellent tutorial Corey as usual. - Many thanks
You have great teaching style . Concise and clear thank you.
I learned more about .loc[ ] than ever before. Thank you good sir!
I can't believe I just watched this for free. Great job!
Excellent job. Congrats!
you are a talented teacher Corey, keep it up! I will always support your channel in anyway possible. Thanks!
oh my god I am gonna cry now... your video really helped me a lot !!!!!
hey Corey, I cannot resist to say thank you for this video. This solved many of my presious ambiguous understanding of Pandas. Very helpful!!
Great video, really easy to listen to and has a great format. I look forward to the rest of these.
this is the most satisfying pandas playlist!
super clear, thank you!
perfect pandas tutorial ever in youtube and even on internet
Great stuff, Corey. Very clear. Thanks
thank you for these lessons Corey!
Beginning with the dictionary of list, 👌 spot on helps.
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!!
whole videos in this series are incredible! you are awesome
Well explained!, many thanks
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!
best python training on universe
I signed up for Brilliant and cancelled my LinkedIn Learning. Love your videos Corey, thank you!
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
Thanks Corey! This video is really useful, especially for someone learning python and Pandas for specific project.
Your knowledge is 3 years old and still hitting very hard a lot of online teaching platforms
Brother, thank you for all the videos.
Struggling to find one good pandas tutorial tries some other good also but this one is the best
Excellent tutorial Corey!
You are the best teacher Corey !! Thank you for doing this for community !
Thank you so much Corey, really clear and very easy to learn. Subscribed.
Krish naik recommended your channel and you are aawesssommmeeeee
Thank you. can you also do a series on GUI perhaps with Qt.
This is very helpful. Thanking for your tutorials.
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.
Really Helpful Series both as a refresher and for a beginner.
Top python video. Straight forward, no bullshit
Thank you thank you thank you soooooo much!!!!! This was so helpful!!!! You're a blessing!!! :)
I see new Corey video, i press like.
Now lets see how can i simplify my life even more.
de best for beginner ever
How are you so good at organizing the information in your videos?? 😮
Thank you, very organized and well explained! Keep the great work!