Тёмный

My top 25 pandas tricks 

Data School
Подписаться 241 тыс.
Просмотров 265 тыс.
50% 1

You're about to learn 25 tricks that will help you to work faster, write better pandas code, and impress your friends. These are the BEST tricks I've learned from 5 years of teaching Python's pandas library.
Don't miss the BONUS at the end of this video!
TRICKS:
0:00 Introduction
0:43 1. Show installed versions
1:20 2. Create an example DataFrame
2:22 3. Rename columns
3:47 4. Reverse row order
4:36 5. Reverse column order
5:01 6. Select columns by data type
5:40 7. Convert strings to numbers
6:55 8. Reduce DataFrame size
8:15 9. Build a DataFrame from multiple files (row-wise)
10:00 10. Build a DataFrame from multiple files (column-wise)
10:45 11. Create a DataFrame from the clipboard
11:50 12. Split a DataFrame into two random subsets
12:57 13. Filter a DataFrame by multiple categories
13:52 14. Filter a DataFrame by largest categories
14:42 15. Handle missing values
15:57 16. Split a string into multiple columns
16:59 17. Expand a Series of lists into a DataFrame
17:39 18. Aggregate by multiple functions
18:41 19. Combine the output of an aggregation with a DataFrame
19:56 20. Select a slice of rows and columns
20:52 21. Reshape a MultiIndexed Series
22:04 22. Create a pivot table
23:01 23. Convert continuous data into categorical data
23:56 24. Change display options
24:47 25. Style a DataFrame
26:14 Bonus. Profile a DataFrame
DOWNLOAD the Jupyter notebook:
github.com/justmarkham/pandas...
WATCH my introductory series, Data Analysis with pandas:
• Data analysis in Pytho...
JOIN the "Data School Insiders" community:
/ dataschool
LET'S CONNECT!
- Email Newsletter: www.dataschool.io/subscribe/
- LinkedIn: / justmarkham
- Twitter: / justmarkham
- Facebook: / datascienceschool
- RU-vid: ru-vid.com?su...

Опубликовано:

 

3 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 658   
@dataschool
@dataschool 5 лет назад
THANKS for watching! 🙌 Which trick are you most excited to start using? CLICK REPLY and let me know!
@TarmoSillajoeGoogle
@TarmoSillajoeGoogle 5 лет назад
Thanks. Trick nr 9- building a dataframe from multiple files is the one i've been searching for. Comment to trick nr. 3. Sometimes modifying column names works by using Python's list comprehension. Say we want to capitalize all column names. Just write: df.columns = [my_col.capitalize() for my_col in df.columns]
@dataschool
@dataschool 5 лет назад
Glad you like trick 9, that is one of my favorites! As for capitalizing column names, a list comprehension works, but a string method is even simpler: df.columns = df.columns.str.capitalize()
@juanbetancourt5106
@juanbetancourt5106 5 лет назад
Thanks, those tricks are really amazing, I wonder if I can take this magic to the web, is it a good choice to combine pandas power with django?
@mritunjaykumar970
@mritunjaykumar970 5 лет назад
The last trick will significantly reduce the amount of work we do understand the data through eda.that trick was amazing.thanks kevin
@sreenivas7739
@sreenivas7739 5 лет назад
Thanks for a great video. Bonus trick is the most useful.
@zackhicks2433
@zackhicks2433 4 года назад
Video should be called 'Magic with Pandas'. Thanks for this really useful resource!
@dataschool
@dataschool 4 года назад
Thank you! 🙏
@sattysattu
@sattysattu 5 лет назад
The long awited video is out now. Thank you so much mate. Great learning with you.
@dataschool
@dataschool 5 лет назад
You're very welcome!
@christopherteoh3094
@christopherteoh3094 4 года назад
The bonus content totally blew my mind off! Thank you very much Kevin! You're simply the best! Looking forward to purchase your ML series!
@dataschool
@dataschool 2 года назад
Thank you so much for your kind words!
@danielperico2806
@danielperico2806 5 лет назад
One of my favorite videos on RU-vid, thank you so much!
@dataschool
@dataschool 4 года назад
Wow! Thank you so much for your kind words! :)
@BasselHaidar
@BasselHaidar 4 года назад
Kevin, love your content and it is amplified by your speech cadence, enunciation, and tone. My favorite tricks are 10 and 11 (Building a dataframe from multiple files rows/columns). Thank you for sharing your knowledge, mad respect!
@dataschool
@dataschool 4 года назад
Thank you so much! 🙏
@gregf9160
@gregf9160 4 года назад
Excited to try ALL of these! Thanks!
@dataschool
@dataschool 2 года назад
You're welcome!
@Alok_Mandal
@Alok_Mandal 3 года назад
you just saved my life, i was collecting these things over google wasted my good time but now i know where to look for. keep sharing , God bless you. Thanks
@dataschool
@dataschool 3 года назад
You are welcome! 😄
@mustafabohra2070
@mustafabohra2070 5 лет назад
Man, you are just so awesome! Giving all these valuable tricks for free on your channel. God bless you!!!
@dataschool
@dataschool 5 лет назад
Thank you so much! Glad you like them 👍
@robertodilisio7535
@robertodilisio7535 5 лет назад
Brilliant as usual! From beginning to end! The bonus was also mind blowing :)
@dataschool
@dataschool 5 лет назад
Thank you so much, Roberto!
@pldeepesh
@pldeepesh 4 года назад
Fantastic! Been using pandas since a year now, You have opened new possibilities for me to keep looking and learning.!! Please keep doing the great work!
@dataschool
@dataschool 4 года назад
Thank you!
@digigoliath
@digigoliath 3 года назад
Awesome!! TQVM!
@dataschool
@dataschool 3 года назад
Thanks!
@laychansethaaerd
@laychansethaaerd 3 года назад
You are amazing!!!
@amandal8170
@amandal8170 3 года назад
Best pandas tutorial !! Thanks
@dataschool
@dataschool 3 года назад
You're welcome!
@winyourself553
@winyourself553 4 года назад
These are really great tricks.
@MadLadsAnonymous
@MadLadsAnonymous 3 года назад
Wow, that last tip! What a phenomenal overview and diagnostic tool. I've learned so much from your videos. So grateful for your content.
@dataschool
@dataschool 3 года назад
Thanks very much for your kind words!
@erickcampos50
@erickcampos50 3 года назад
Useful is the word! Thank you
@dataschool
@dataschool 3 года назад
You're welcome!
@franklinwanderson4316
@franklinwanderson4316 4 года назад
The best! Thanks so much!
@dataschool
@dataschool 2 года назад
You're welcome!
@site-activator5411
@site-activator5411 3 года назад
Very cool! Thank you!
@dataschool
@dataschool 2 года назад
You're welcome!
@AZ993k
@AZ993k Год назад
Amazing! Thank you!
@dataschool
@dataschool Год назад
You're welcome!
@kishlayamourya3141
@kishlayamourya3141 Год назад
Best pandas video ever!
@dataschool
@dataschool Год назад
Thank you! 🙌
@cradleofrelaxation6473
@cradleofrelaxation6473 7 месяцев назад
I can’t have enough of this!!
@dataschool
@dataschool 6 месяцев назад
Thank you!
@FabioKasper
@FabioKasper 2 года назад
Great stuff. Thanks for the tips.
@dataschool
@dataschool 2 года назад
You're welcome!
@vlinkin22
@vlinkin22 4 года назад
Very helpful, Thanks !
@dataschool
@dataschool 4 года назад
You're welcome!
@aleloupmadrid
@aleloupmadrid 4 года назад
Absolutely brilliant!
@dataschool
@dataschool 4 года назад
Thank you!
@youngzproduction7498
@youngzproduction7498 5 лет назад
Yeah, 25 tricks!! I would like to thank you a lot for sharing these tips.
@dataschool
@dataschool 5 лет назад
You're very welcome!
@DiegoTerzano
@DiegoTerzano 4 года назад
Fantastic tips, thank you!! Super valuable and with clear, practical examples. Once again, thank you!
@dataschool
@dataschool 4 года назад
Thank you so much! 🙏
@adithiaa4385
@adithiaa4385 2 года назад
The last 5 tricks were fantastic.!!
@dataschool
@dataschool 2 года назад
Thank you!
@leonardoalvarado7632
@leonardoalvarado7632 2 года назад
Thank you for all these tricks.
@dataschool
@dataschool 2 года назад
You're welcome!
@OmarAbdelaziz__47
@OmarAbdelaziz__47 3 года назад
Thank you Kevin, You are really a good instructor. Also, I really loved how you shout out people your learnt tricks from, that's very awesome!
@dataschool
@dataschool 3 года назад
Thank you!
@JRomeyC
@JRomeyC 5 лет назад
Fantastic content as always. Thank you Kevin!
@dataschool
@dataschool 5 лет назад
You're very welcome Jerome! Glad you liked it 😊
@vishalwaghmare3130
@vishalwaghmare3130 3 года назад
Super duper useful video. Amazing!!
@dataschool
@dataschool 2 года назад
Thank you!
@maxvinella941
@maxvinella941 5 лет назад
This is a jewel video! All tricks left me without words! thanks
@dataschool
@dataschool 5 лет назад
You're very welcome! 💎
@siddhartha8886
@siddhartha8886 4 года назад
Thank you, for giving me shout out, and thank you for including my trick in your video (pd.profiling) :)
@homeuse8879
@homeuse8879 5 месяцев назад
Awesome pandas tricks!!! Thanks for this great resource
@dataschool
@dataschool 3 месяца назад
You're very welcome!
@hectoralvarorojas1918
@hectoralvarorojas1918 5 лет назад
Well done Kevin! Thanks for sharing this great material. My best regards!
@dataschool
@dataschool 5 лет назад
You're very welcome, Hector!
@Asparuh.Emilov
@Asparuh.Emilov Год назад
This is one of the most useful coolest videos about Pandas I have ever watched. Thank you sooooo much for compiling all these tips and tricks! Absolutely amazing!!!!!!
@dataschool
@dataschool Год назад
You're very welcome! 🙌
@ScottLinne
@ScottLinne 5 лет назад
Great video. The bonus tip is very useful.
@dataschool
@dataschool 5 лет назад
Thanks!
@sanjaykrish8719
@sanjaykrish8719 4 года назад
Wow... Veryyyy cool tricks. Saves a ton of time.
@dataschool
@dataschool 4 года назад
Thanks Sanjay! 🙌
@minglee5164
@minglee5164 3 года назад
The bonus trick is so amazing
@dataschool
@dataschool 2 года назад
Thank you!
@BVaibhav-mt8jx
@BVaibhav-mt8jx 3 года назад
Pure GOLD!
@dataschool
@dataschool 3 года назад
Thanks!
@mateuszguszkowski8214
@mateuszguszkowski8214 5 лет назад
Totally awesome!!! Thanks!!!
@dataschool
@dataschool 5 лет назад
You're very welcome!
@irfankhuddus1974
@irfankhuddus1974 5 лет назад
Superb ! Excellent ! introduction for Beginner (myself) to get introduced and master these Pandas at the same time thereby saving me a lot of time. Thank you so much Kevin !!! You Rock !!!
@dataschool
@dataschool 5 лет назад
That's great to hear! Thanks for watching 👍
@pradeepgb986
@pradeepgb986 3 года назад
Kevin, you are simply amazing. Thanks for sharing these wonderful tricks!
@dataschool
@dataschool 3 года назад
Glad you like them!
@davidyoo647
@davidyoo647 5 лет назад
thank you this is amazing. will be saving this for future reference!
@dataschool
@dataschool 5 лет назад
Awesome! Glad it was helpful to you 👍
@michaelnovik270
@michaelnovik270 3 года назад
AAAAaaaaa sweet tips! Thank you so much!
@dataschool
@dataschool 3 года назад
You're very welcome!
@thomasmendy9802
@thomasmendy9802 4 года назад
Kevin Markham, you by far one of the best Data Science Instructor, I came across. Thank you for providing us with such high standard content at no cost.
@dataschool
@dataschool 4 года назад
Thank you so much! 🙏
@eddysan7k
@eddysan7k 3 года назад
what the awesome tricks!! thank you!!
@dataschool
@dataschool 3 года назад
You're very welcome!
@yahyahamid5762
@yahyahamid5762 2 года назад
Thank you for the video, really useful stuff!
@dataschool
@dataschool 2 года назад
Glad it was helpful!
@brendafosmire6519
@brendafosmire6519 4 года назад
Best Pandas trips ever. I’m going to make myself some flash cards for each of these. Thank you.
@dataschool
@dataschool 4 года назад
You're very welcome! Glad you like them!
@shreddersengupta7384
@shreddersengupta7384 3 года назад
This is great !!!
@dataschool
@dataschool 3 года назад
Thanks!
@dataschool
@dataschool 4 года назад
Want even MORE pandas tricks? I share a new trick here every weekday 👉 www.dataschool.io/python-pandas-tips-and-tricks/ 👈
@Dara-lj8rk
@Dara-lj8rk 4 года назад
Please make a video on time series analysis in Pandas
@dataschool
@dataschool 4 года назад
Thanks for your suggestion!
@kasiasama7322
@kasiasama7322 5 лет назад
Great job Kevin. Learned a lot.
@dataschool
@dataschool 5 лет назад
Thanks! Great to hear 👍
@vadivelan4228
@vadivelan4228 4 года назад
Thanks for this consolidated and a very crisp video on Pandas....
@dataschool
@dataschool 4 года назад
You're welcome!
@kislaylove
@kislaylove 3 года назад
Last Bonus tip, Best in 2020 till date. Thank you so much. You have made my life easy!!!
@dataschool
@dataschool 3 года назад
Thank you!
@suemareverton7756
@suemareverton7756 5 лет назад
Great as usual, thanks Kevin!
@dataschool
@dataschool 5 лет назад
Thank you so much!
@dew_reddit
@dew_reddit 5 лет назад
Wow the last one was fantastic. styling the dataframe was also pretty neat. Thanks for this 👍
@dataschool
@dataschool 4 года назад
You're very welcome!
@Yuri-to8uj
@Yuri-to8uj 2 года назад
the best guy in this business!!!
@dataschool
@dataschool 2 года назад
Thank you so much! 🙏
@CJP3
@CJP3 5 лет назад
Pandas Profiling! I'm so excited to use it!
@dataschool
@dataschool 5 лет назад
Nice! Let me know how it goes 🙌
@daniel76900
@daniel76900 2 года назад
saved my life!! Thanks!
@dataschool
@dataschool 2 года назад
That's awesome to hear! 🙌
@YourMakingMeNervous
@YourMakingMeNervous 4 года назад
Great video. I didn't know about the cut function and it will make a portion of my daily data processing tasks a lot easier. Thanks!
@dataschool
@dataschool 4 года назад
That's awesome to hear!
@naqeeb16
@naqeeb16 Год назад
It is one of the best videos on Pandas. I really love some of the tricks e.g., the Clipboard', and 'The Excel copy & paste ones.
@dataschool
@dataschool Год назад
Glad it was helpful! Thanks for your kind words!
@renatosabinobr
@renatosabinobr Год назад
Excellent content!!!
@dataschool
@dataschool Год назад
Much appreciated!
@92soyeon
@92soyeon 2 года назад
Fantastic! It really helped me escaping from a lot of itchy situations!
@dataschool
@dataschool 2 года назад
Great to hear!
@snehashinde21
@snehashinde21 3 года назад
This was amazing video to sum up basic Pandas usage. Thanks for this useful resources!
@dataschool
@dataschool 3 года назад
Thank you for the kind comment!
@barrjohnm
@barrjohnm 3 года назад
Awesome video!
@dataschool
@dataschool 3 года назад
Thank you!
@tellkorok
@tellkorok 5 лет назад
The bonus is cherry on the cake!
@dataschool
@dataschool 4 года назад
🍒
@jacquesgouimenou9668
@jacquesgouimenou9668 4 года назад
Thanks for sharing this work.
@dataschool
@dataschool 4 года назад
You're welcome!
@jongcheulkim7284
@jongcheulkim7284 2 года назад
Thank you so much. This is very helpful.
@dataschool
@dataschool 2 года назад
Great to hear!
@karthikeyan-ro6ud
@karthikeyan-ro6ud 3 года назад
Useful one!👍
@dataschool
@dataschool 2 года назад
Thanks!
@CodePhiles
@CodePhiles 4 года назад
great video , thanks a lot
@dataschool
@dataschool 4 года назад
Thanks!
@tunkyi7162
@tunkyi7162 4 года назад
It helps me a lot in Data Wrangling. I really love your videos. Keep doing!
@dataschool
@dataschool 4 года назад
Great to hear!
@meghasyam427
@meghasyam427 2 года назад
Holy Moly What a master piece this is. I liked the clipboard trick a lot man like that literally saves a lot of code and time. And the bonus blew me off. It looks literally like a final report LOL. Can't wait to implement these tricks in my analytics work. Thanks a lot Data School
@dataschool
@dataschool 2 года назад
You're very welcome! Thanks for your kind words!
@markjudeestrera
@markjudeestrera 4 года назад
sweet!, very handy! Thank a lot Kevin!
@dataschool
@dataschool 4 года назад
You're very welcome!
@valeriemolignano8127
@valeriemolignano8127 3 года назад
Kevin, you are a fantastic instructor. I'll sign up for anything you offer. My 2 favorites: clipboards, and, what made my mouth drop - the dataframe profiling.
@dataschool
@dataschool 3 года назад
Thank you so much for your kind words Valerie! I have a lot of resources that might interest you here: www.dataschool.io/start/ And here is my email newsletter: www.dataschool.io/subscribe/ Thanks again!
@giangtu6000
@giangtu6000 3 года назад
I love you! KEVIN!
@jongcheulkim7284
@jongcheulkim7284 3 года назад
Thank you so much. I learned a lot of good things. Thank you.
@dataschool
@dataschool 3 года назад
You are so welcome!
@riessm
@riessm 5 лет назад
First time ever I honestly wish I could upvote this more than once! Great tips, great explanation! One short addition to trick 19: I enjoyed getting to know the transform method, but as most of the times in pandas, there is another way with (for me at least) more often used functions: Just take the aggregated data-frame and merge it with the old one (left merge) instead of concatenating. I don't know if there are any runtime benefits of any of these methods, but to me it's one less command to remember - even though now I will look into uses of the transform method! :-)
@dataschool
@dataschool 5 лет назад
Thank you so much! 🙏 As for trick 19, you are totally right that merge could accomplish the same thing. I like the transform code much better, but I also encourage people to learn fewer functions overall, so there's nothing wrong with just using merge! Anyway, thanks again for your kind words 😊
@MrDEBONTUBE
@MrDEBONTUBE 3 года назад
Thanks for compiling it at one place
@dataschool
@dataschool 3 года назад
You're welcome!
@rvg296
@rvg296 4 года назад
No other trick mentioned in the video is comparable to the Bonus Trick (Profiling).. This is simply outstanding !!!!
@dataschool
@dataschool 4 года назад
Thanks!
4 года назад
So cooool! Thank you!
@dataschool
@dataschool 2 года назад
You're welcome!
@user-vd1km3dw2w
@user-vd1km3dw2w 2 года назад
Thanks a lot! It's a great video!
@dataschool
@dataschool 2 года назад
Thank you!
@danielmonroy6874
@danielmonroy6874 4 года назад
Thank you so much! This is great!
@dataschool
@dataschool 2 года назад
You're welcome!
@ankushsharma-gu7co
@ankushsharma-gu7co 5 лет назад
Needless to say. Thank you once again for the excellent video, like always very neat explanation and clean deployment of ideas.
@dataschool
@dataschool 5 лет назад
Thank you so much! I'm glad the video was helpful to you!
@uguree
@uguree 3 года назад
one word, Amazing!!
@dataschool
@dataschool 2 года назад
Thanks!
@goldenmonkey9085
@goldenmonkey9085 5 лет назад
Thank you so much! Keep going!
@dataschool
@dataschool 5 лет назад
You're welcome!
@not_a_human_being
@not_a_human_being 5 лет назад
Pretty awesome!
@dataschool
@dataschool 5 лет назад
Thank you so much! 🙌
@matthewwallace2512
@matthewwallace2512 4 года назад
Really informative Kevin, appreciate your effort in creating these video's. Such a valuable resource. Trick 19 was probably my favourite.
@dataschool
@dataschool 4 года назад
Thanks for your kind words, and thanks for sharing! 🙌
@AryanSingh-jf8tc
@AryanSingh-jf8tc 2 года назад
it's actually quite helpful, thx a lot
@dataschool
@dataschool 2 года назад
Great to hear!
@archowdhury007
@archowdhury007 5 лет назад
Amazing tips!!!......keep sharing more such videos
@dataschool
@dataschool 5 лет назад
Glad you like them! 😄
@Music-qm4pw
@Music-qm4pw 3 месяца назад
Very useful!!!!!
@dataschool
@dataschool 3 месяца назад
Thanks!
@yullidias
@yullidias 4 года назад
Very helpful! Thanks
@dataschool
@dataschool 4 года назад
You're welcome!
@galymzhankenesbekov2924
@galymzhankenesbekov2924 4 года назад
thank you so much for your effort and these videos!
@dataschool
@dataschool 4 года назад
You're very welcome!
@younus6133
@younus6133 5 лет назад
Great.Thanks
@dataschool
@dataschool 5 лет назад
You're welcome!
@sushedbubai
@sushedbubai 5 лет назад
All the tricks were mind blowing. But the bonus one was out of the world. It is surely going to help those who struggles Exploratory Data Analysis. Many thanks for sharing this.
@dataschool
@dataschool 5 лет назад
Awesome! So glad it was helpful to you! 🙌
@maxxpool
@maxxpool Год назад
I'm so glad I chose to click on this video. Thank you for this amazing video!
@dataschool
@dataschool Год назад
You're so welcome!
@ravisoni1386
@ravisoni1386 3 месяца назад
Thanks a lot for these tips❤
@dataschool
@dataschool 3 месяца назад
My pleasure!
@clementineh2565
@clementineh2565 4 года назад
Thanks for your help. It's very clear and easy to understand.
@dataschool
@dataschool 4 года назад
You're very welcome!
@jjlian1670
@jjlian1670 5 лет назад
Love ur video so much! One more step towards becoming a Pandas Wizard!
@dataschool
@dataschool 5 лет назад
Awesome! Good luck on your quest 🌟
@anastasiiag8518
@anastasiiag8518 4 года назад
This is incredibly useful! And explained perfectly! Thank you! It would be awsome to see from you some content on advanced plotting, data plotting tricks :)
@amandal8170
@amandal8170 3 года назад
Agree, if we can see the plotting ticks will be fan jolly tastic. :p
@dataschool
@dataschool 2 года назад
You're very welcome, and thanks for your suggestions!
@Goodhealthall2015
@Goodhealthall2015 3 года назад
I had some trouble with my dataframe. So I was stumbling over the internet to find solution,and your video came. Although I didn't find solution in your video, but one of the trick gave me a logical idea of how to resolve the issue. It told me where I was wrong. And as far as tricks are concerned, they are amazing. Some went over my head but that's okay. This whole panda python thing is new to me. I'd prefer to bite slow instead of gulping down entire meal in one go
@dataschool
@dataschool 2 года назад
Thanks for your kind words, and glad I could be helpful!
Далее
21 more pandas tricks
24:40
Просмотров 47 тыс.
Make Your Pandas Code Lightning Fast
10:38
Просмотров 178 тыс.
Давидыч против Тамаева 3 ЧАСТЬ
00:56
Exploratory Data Analysis with Pandas Python
40:22
Просмотров 436 тыс.
Introducing Python in Excel
19:01
Просмотров 1,5 млн
11 Tips And Tricks To Write Better Python Code
11:00
Просмотров 603 тыс.
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
4 Pandas Functions That I Wish I Knew Earlier
4:33
Просмотров 23 тыс.
Data Cleaning in Pandas | Python Pandas Tutorials
38:37