Тёмный

Python Pandas Tutorial 7. Group By (Split Apply Combine) 

codebasics
Подписаться 1,1 млн
Просмотров 344 тыс.
50% 1

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

 

12 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 301   
@codebasics
@codebasics 2 года назад
Check out our premium machine learning course with 2 Industry projects: codebasics.io/courses/machine-learning-for-data-science-beginners-to-advanced
@innaschneiderman5761
@innaschneiderman5761 6 лет назад
Your tutorials are excellent, better than Coursera's course. Thanks! :)
@Rajeshsharma-dw7gk
@Rajeshsharma-dw7gk 4 года назад
same here i also feel it
@YuyinSports
@YuyinSports 4 года назад
I was doing the introduction to data science by the university of Michigan. The professor totally butchered the explanation of the group by function..
@atharvakshirsagar3755
@atharvakshirsagar3755 4 года назад
@@YuyinSports I know right!!!! He went so fast, I could barely grasp. codebasics is a lifesaver fr!!
@Khanarmaanrokz
@Khanarmaanrokz 4 года назад
@@YuyinSports exactly, he's taking such a huge dataframe, can't even understand what happens after the query.
@xavierfernandis6272
@xavierfernandis6272 4 года назад
Same he's too fast
@ruttananrongsawad2232
@ruttananrongsawad2232 Год назад
You are the first tutor I came across who manage to do the visualization of the groupby process!
@sarveshpandey1125
@sarveshpandey1125 4 года назад
Iterating a groupby object is something I liked most! wasn't aware of this before
@houseoffahad5976
@houseoffahad5976 2 года назад
man you are the best! even after paying good amount of fees, one can't expect this kind of teaching.
@codebasics
@codebasics 2 года назад
👍👍☺️
@TheDeltatoGrowth
@TheDeltatoGrowth 6 лет назад
I really like these short tutorials. Great refresher content here! Maybe you can make a video with aggregations and complex groupbys and how to visualise them conceptually like you showed us the grioupby object conceptual viz? That would really really help. Please!
@forever-fz1hk
@forever-fz1hk 5 лет назад
yes love you too
@dwivedys
@dwivedys Год назад
To get different kinds of stats on different columns over the groupby Object (g) we can use like so - g.aggregate({'temperature':'mean', 'windspeed':'max'}) --- will give average temperatures and max windspeed for the cities in the group by object (g)
@PRABHATKUMAR-sc4qo
@PRABHATKUMAR-sc4qo 5 лет назад
I believe that a good teacher is not the one , who spoon feed you , but the who can inspire you to appreciate the beauty of Subject. You have same impact on me. Thank you for showing me the whole new world of analytics :)
@AbebawuPawulose
@AbebawuPawulose 7 месяцев назад
hey, are you working as data scientist at this time?
@subhamsaha2235
@subhamsaha2235 2 года назад
exceptional, maja aa gya. I was just brushing up and literally this is the best course because I am doing it in 2X and your voice and speed both highly correlate to give a best course. Superb.
@BiggyLiggy-k7o
@BiggyLiggy-k7o Год назад
I always had trouble understaing 'group by' and that's not uncommon, No one has explained it better than you, that pictorial representation explains a lot Using pictures to make the concept clear is something what a really good data scientist and a really good teacher would do
@jairajsahgal7101
@jairajsahgal7101 2 года назад
I never understood groupby and it is used a lot in data analytics. Thank you for the explanation.
@codebasics
@codebasics 2 года назад
Glad it was helpful!
@vishg.1533
@vishg.1533 Год назад
far better than college lectures, excellent teaching method and easiest way to learn the topics, man you are gem. I've followed you since when I'd watch your data basic roadmap, now I also wanna become data analytics and I followed your roadmap and it's far more better than other classes. You've helped so many youth's who wanted to become data analytics. Thank you sir once again. appreciate your work. keep goin'
@valijoneshniyazov
@valijoneshniyazov 3 года назад
at 5:45, let me correct you, statement below throws error SELECT * FROM CITY_DATE GROUP BY CITY when grouping, you can only select aggregated date rather than all columns *. To get what exactly you want, please write: SELECT * FROM CITY_DATE where CITY = 'cityname' Thanks for making awesome tutorials!
@mschuer100
@mschuer100 3 года назад
Just came across this video. Have watched a lot of these tutorials on groupby and this is by far the best. Perfect explanation and description of groupby in a small amount of time. Well done and thank you
@codebasics
@codebasics 3 года назад
Glad it helped M Schuer!
@ruhannegi8376
@ruhannegi8376 2 года назад
This is the first time I have seen in any channel. This make shim different than others.. keep going.
@sirakt2743
@sirakt2743 4 года назад
May God Bless.Your tutorials are better than an MIT or Harvard class.
@codebasics
@codebasics 4 года назад
Glad you liked it Suraj 😊👍
@sirakt2743
@sirakt2743 4 года назад
Your Tutorials are more than Excellent and Thank you for your service to the people of the world.
@parisa9374
@parisa9374 6 лет назад
Thank you so much for this great tutorial! I look forward to seeing more of your work especially tutorials on pandas. All the best.
@diegoraggio3180
@diegoraggio3180 7 лет назад
Fantastic job with these tutorials! Keep it up!
@saikishor2811
@saikishor2811 Год назад
clear explanation thanks.
@Khanarmaanrokz
@Khanarmaanrokz 4 года назад
better than the coursera lectures.
@allasrinivasulu1464
@allasrinivasulu1464 4 года назад
Excellent way of teaching i seen so far for data science thank you so much sir
@mistercakes
@mistercakes 4 года назад
this was the best explanation of groupby i've come across. thank you.
@yomi_Ŷ-Ŷ
@yomi_Ŷ-Ŷ 2 года назад
Really Your teaching method is so excellant
@neelammishra5622
@neelammishra5622 2 года назад
Thank you so much for making it so logical and clear explanation. Your knowledge is precious to people like me. Thanks a ton
@frankservant5754
@frankservant5754 4 года назад
Thank you man i'm using this for my doctorate research
@codebasics
@codebasics 4 года назад
Great Frank. I am glad you are finding it useful
@daynearthur7980
@daynearthur7980 5 лет назад
Love your tutorial , your explanation is very clear and easy to understand
@codebasics
@codebasics 5 лет назад
Glad it was of help to you Dayne.
@Satelliteua
@Satelliteua 6 лет назад
The best explanation of groupby I've ever seen :) What if you want to groupby multiple categories? For example, cities and districts.
@Satelliteua
@Satelliteua 6 лет назад
Thanks for replying, you're awesome!
@GirishAjmera
@GirishAjmera 4 года назад
Very well explained and a simple tutorial for Groupby.
@codebasics
@codebasics 4 года назад
Hi Girish, I am glad that you like my videos. Keep learning. 😊
@SulemanTheTraveller
@SulemanTheTraveller 3 года назад
An interesting lecture cleared many points.
@pradeeplal2983
@pradeeplal2983 5 лет назад
You are really intelligent.Please share more videos on Python.Like Take one project and help completing that.Like wise you can help making at least 5 to 6 Projects of different genre.Anyways You are doing great .May God keep u healthy, wealthy and wise.
@codebasics
@codebasics 5 лет назад
Many people have given me this feedback of doing teaching using specific projects and it definitely makes sense. And thanks for your appreciation and feedback 😊
@anandsingh1011
@anandsingh1011 6 лет назад
Awesome.. you have made so easy to learn Panda . Thank you very much
@kannanv8831
@kannanv8831 4 года назад
Every tutorial of yours is so interesting.
@codebasics
@codebasics 4 года назад
Thanks Kannan. 😀
@HimanshuSharma-we5li
@HimanshuSharma-we5li 2 года назад
You just explained it brilliantly 🙏🙏🙏
@codebasics
@codebasics 2 года назад
Glad you liked it
@panagiotisgoulas8539
@panagiotisgoulas8539 5 лет назад
Shouldn't we do g['temperature'].max()? As is g.max() it just states the max for every column which doesn't make much sense
@pavanbolla5999
@pavanbolla5999 5 лет назад
I do have the same question as: g.max() is generic command
@dimitriskass1208
@dimitriskass1208 4 года назад
I think you are right. When i execute g.max() command i get an 'AssertionError'
@hemantbodi1
@hemantbodi1 2 года назад
Groupby explained in such detail. Thanks for sharing this!
@faizmohammad8079
@faizmohammad8079 4 года назад
Great video.. i have 1 question when you apply g.max() function the it returns maximum value from each column but what in case of event ? is it return max size string from the events?? that's why it returned "sunny" from mumbai dataframe????
@sudipbala9647
@sudipbala9647 2 года назад
you are very good teacher.
@nriezedichisom1676
@nriezedichisom1676 3 года назад
Best tutorial on this platform.. Well done
@codebasics
@codebasics 3 года назад
Glad it was helpful!
@kevingonzalez2927
@kevingonzalez2927 2 года назад
great video. the visualization of what groupby does helped immensly
@codebasics
@codebasics 2 года назад
👍☺️
@ajitkumar15
@ajitkumar15 4 года назад
Thank you so much !!!! for making this video.It gives picture of what is going inside and gives more control on coding
@aashishraina2831
@aashishraina2831 6 лет назад
you have made such good videos for Pandas. Keep up the good work.My wishes
@meandmyRC99
@meandmyRC99 5 лет назад
Loved the explanations and diagrams of what is happening! Thanks!
@codebasics
@codebasics 5 лет назад
Robert I am glad you liked the visualization.
@codebasics
@codebasics 5 лет назад
Step by step roadmap to learn data science in 6 months: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-H4YcqULY1-Q.html Machine learning tutorials with exercises: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-gmvvaobm7eQ.html 5 FREE data science projects for your resume with code: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-957fQCm5aDo.html
@jithe2001
@jithe2001 2 года назад
Very helpful! Couldn’t find it better anywhere else. Thanks!
@rakeshdeo6197
@rakeshdeo6197 2 года назад
Really very good presentation, keep it up sir. Rakesh Deo from Kathmandu, Nepal.
@abhishekchhari9703
@abhishekchhari9703 3 года назад
Thank you for covering this topic really helpful, please tell me how to groupby dates in your data set and setting frequency to monthly
@jessicafb5398
@jessicafb5398 4 года назад
This was a great tutorial, thank you!
@codebasics
@codebasics 4 года назад
Thanks Jessica
@joaorinaldo1080
@joaorinaldo1080 2 года назад
TE AMO MUITO MANO, NAMORAL VOCE SALVOU A MINHA GRADUAÇÃO
@irmscher9
@irmscher9 5 лет назад
Always just in the right time with the right tutorial. Thank you very much!
@MQ2011de
@MQ2011de 7 лет назад
In PyCharm you need for the graphs: import matplotlib.pyplot as plt g.plot() plt.show()
@marvinkweyu5206
@marvinkweyu5206 6 лет назад
Was looking for this..Much appreciated
@okonkwo.ify18
@okonkwo.ify18 Год назад
U explained it properly. Thanks
@tanya5142
@tanya5142 2 года назад
It is very well explained!!! Thx a lot for the video!
@tharuntejreddythodimi2142
@tharuntejreddythodimi2142 4 года назад
Simply mind-blowing nice explanation sir
@Banefane
@Banefane 8 месяцев назад
Genius explainer you are!
@ZinzinsIA
@ZinzinsIA 2 года назад
Exactly what I was searching for, thx a lot !
@codebasics
@codebasics 2 года назад
Glad it was helpful!
@vgramesh7500
@vgramesh7500 6 лет назад
Very simple explaination of the Group by concept....keep it up mate...
@parisa9374
@parisa9374 6 лет назад
Hi there again, Is it possible to recommend some datasets(short or long) to use them during pandas documentation toturials please? Thanks
@rashmidutta7151
@rashmidutta7151 2 года назад
i have been using pandas , but never knew this about group by
@ayushurmaliya5217
@ayushurmaliya5217 4 года назад
i have spent thousand of money to buy courses from diff diff vendors and at last learning from here, which is far far batter than anywhere else.
@codebasics
@codebasics 4 года назад
Thanks ayush. If you like my work please share it on LinkedIn, Facebook and wats app so that it can reach to other people 👍😊
@KanishkKumar-m8t
@KanishkKumar-m8t 9 месяцев назад
Your tutorials are really good, but please include the Excel sheets you will be using in the video description, it's a hassle to create them ourselves every time
@codebasics
@codebasics 9 месяцев назад
Check video description. They should be available
@KanishkKumar-m8t
@KanishkKumar-m8t 9 месяцев назад
@@codebasics Extreme sorry I didn't check it out properly
@prasadjayanti
@prasadjayanti 2 года назад
simply outstanding !
@rulaniya
@rulaniya 6 лет назад
you are doing great....!!! Good work.. Looking forward to it...
@cxueyu
@cxueyu 4 года назад
Very informative, thank you for this. One question I have is there a way we can run a liner regression model for each of the group separate from the other?
@daveythe2nd146
@daveythe2nd146 3 года назад
Thanks man. You saved me. What a legend
@codebasics
@codebasics 3 года назад
Glad I could help
@LakshmiHari2005
@LakshmiHari2005 Год назад
Very Useful .Thank you so much
@sgoyal14
@sgoyal14 4 года назад
g.max() should be used for a specific column, otherwise it just gives the maximum value of each column in one row which may or may not be associated.
@Userh20245
@Userh20245 5 лет назад
Excellent tutorials ,thanks
@neerajgupta2407
@neerajgupta2407 7 лет назад
Great tutorial...Thanks for this. I want to know how can we apply a custom function on each group.? Say i hve grou by column 'A', and Column B contais some string value. and i want to apply a custom logic on Group for column B. How can i do that.?
@mukeshgh05
@mukeshgh05 2 года назад
Thank you very much for these very useful and "easy to learn" tutorials!!
@GodsNode
@GodsNode 7 лет назад
The visual you created is very helpful. Thanks.
@komalashashidhar9795
@komalashashidhar9795 2 года назад
Sir can you please do vedio on how a group by output can we convert into a dataset .
@debashissahoo5031
@debashissahoo5031 6 лет назад
thank you sir, your visual representation was really helpful. do you have tutorial part - II for this group by
@cocoph
@cocoph 3 года назад
Great Tutorial! Do you know how to save to .csv after you group them into 3 different cities?
@praveenagrawal3035
@praveenagrawal3035 4 года назад
Thanks for the vedio.... Can we do grouping by months!!
@DreamCodeLove
@DreamCodeLove 4 года назад
for getting maximum temperature i would have preferred to pass a dictionary mapping aggregating column i.e temperature to aggregating function i.e max to agg method... g.agg({'temperature' : 'sum'})
@abigaileileenmarx6761
@abigaileileenmarx6761 2 года назад
This is a super helpful video. What if I want to get the average windspeed on days in Mumbai hotter than 70? I am having trouble returning the windspeed value based on multiple criteria. Can someone show me example code on how I would get that?
@ojhaashirbad
@ojhaashirbad 4 года назад
Really, I am liking so much. 👌👌👌👌
@ramanak6961
@ramanak6961 4 года назад
Great tutorials and Awesome explanation !!!! Thank you again.
@salmansadi9842
@salmansadi9842 Год назад
Great Explanation.
@SweetSourTravel
@SweetSourTravel Год назад
Nice 👍
@DjElio100
@DjElio100 Год назад
Nice, thanks for share this!... you rock!
@tombrad8795
@tombrad8795 4 года назад
it is a great presentation! I wish you could also add things like how to select the row with the max temperature within each city.
@codebasics
@codebasics 4 года назад
Answer to your question is here: www.datasciencemadesimple.com/group-by-maximum-in-pandas-dataframe-python-2/
@marskid3583
@marskid3583 4 года назад
Great video! Concise and to the point! Thank you :)
@marskid3583
@marskid3583 4 года назад
Also, the visualization makes all the difference and is what all other videos are missing!
@crazyvashisth
@crazyvashisth 5 лет назад
That's an awesome tutorial bro😉😄😄😄
@Drkalaamarab
@Drkalaamarab 4 года назад
Hi Chetan, My name is Praveen I am working as Data Scientist and I have few queries how to connect with you ? Do you have any contact number ? Please
@kelseysmuczynski1890
@kelseysmuczynski1890 5 лет назад
Do you have any suggestions as to the best way to plot the temperature and wind speed in separate plots for each city group? Ideally, there would be three plots for each city with date as the x-axis, and value of either temp or windspeed on the y-axis.
@basobroy1249
@basobroy1249 3 года назад
use subplot
@RP-mp4ow
@RP-mp4ow 6 лет назад
This entire course you put together is exceptional! I really appreciate this information along with the effort and focus you used to make such an excellent series of tutorials!
@ahmedhelal920
@ahmedhelal920 3 года назад
i am with you till the end
@tamyezalisaleh2800
@tamyezalisaleh2800 4 года назад
Thank you بارك الله فيك
@codebasics
@codebasics 4 года назад
😊👍
@jhoanmartinezsilva2609
@jhoanmartinezsilva2609 4 года назад
big thanks, awesome!!, can i turned in a dataframe ?
@ryaandnice
@ryaandnice 7 лет назад
Clear and to the point. Thanks dude.
@riaverma8945
@riaverma8945 4 года назад
Could you run the g.describe() and evaluate by city without having done the group by prior? Or do you have to split the data in a groupby beforehand?
@krishnajadhav867
@krishnajadhav867 4 года назад
Great.........................!
@amittripathy6583
@amittripathy6583 6 лет назад
Add some more real world live project, your videos are very easy to understand.
@hacaify
@hacaify 4 года назад
good video bro. keep it up!
@codebasics
@codebasics 4 года назад
Recker, I am happy this was helpful to you
@sanjaykrish8719
@sanjaykrish8719 6 лет назад
Excellent tutorial.. I learnt a lot because of you.. Thank you so much
@dharmendra811
@dharmendra811 6 лет назад
great to have these videos. how can I write the values in excel after applying for loop??
@HeatherRoseMusician
@HeatherRoseMusician 7 лет назад
Thanks for posting! Great Video! How can you save the filtered data frame "groups" as new csv files?
@HeatherRoseMusician
@HeatherRoseMusician 7 лет назад
thanks!
@zahidullah1707
@zahidullah1707 2 года назад
hats off to you Sir...
@sribastavrajguru304
@sribastavrajguru304 6 лет назад
Nice tutorial, the whole series
Далее
Python Pandas Tutorial 8. Concat Dataframes
15:14
Просмотров 206 тыс.
Data Cleaning in Pandas | Python Pandas Tutorials
38:37
这到底是怎么做到的 #路飞#海贼王
00:10
Просмотров 3,9 млн
The Complete Guide to Python Pandas Groupby
44:17
Просмотров 10 тыс.
Pandas Functions: Apply vs. Map vs. Applymap
11:53
Просмотров 26 тыс.
How To Self Study AI FAST
12:54
Просмотров 564 тыс.
Best Data Science Books for Beginners 📚
16:13
Просмотров 355 тыс.
Pandas Groupby | How to Use Pandas Groupby
22:30
Просмотров 1,4 тыс.
这到底是怎么做到的 #路飞#海贼王
00:10
Просмотров 3,9 млн