Level Up Python Pandas GroupBy | Five Minute Python Scripts | Subscriber Request
Thanks for your suggestions keep them coming!!
0:00 introduction
0:12 viewing the data
0:59 reading in data
1:59 groupby
4:24 writing new workbook
5:17 Conditional Index
Data used in this video:
https://github.com/Derrick-Sherrill/DerrickSherrill.com/blob/master/Python%20Pandas/Level%20Up%20Groupby/OrderHistory.xlsx
Kite helps fund the channel, thanks for checking them out and supporting me --
https://www.kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=derricksherrill&utm_content=description-only
⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing.
Merch Store --
https://derricksherrill.store/
Support the Channel on Patreon --
https://www.patreon.com/join/derricksherrill
Join The Socials --
Reddit - https://www.reddit.com/r/CodeWithDerrick/
FB - https://www.facebook.com/CodeWithDerrick/
Insta - https://www.instagram.com/codewithderrick/
Twitter - https://twitter.com/codewithderrick
LinkedIn - https://www.linkedin.com/in/derricksherrill/
GitHub - https://github.com/Derrick-Sherrill
*****************************************************************
Full code from the video:
https://github.com/Derrick-Sherrill/DerrickSherrill.com/tree/master/Python%20Pandas/Level%20Up%20Groupby
import pandas as pd
df = pd.read_excel('OrderHistory.xlsx')
df = df.sort_values(by='Order ID', ascending=True)
print(df.head(10))
agg_functions = {
'Sales Amount' : 'sum',
'Order Type' : ', '.join,
}
simplified_df = df.groupby('Order ID').agg(agg_functions)
simplified_df.to_excel('simplified_order_history.xlsx')
multiple_item_orders = simplified_df[simplified_df['Order Type'].str.contains(',')]
print(multiple_item_orders)
Packages (& Versions) used in this video:
Pandas 1.2.4
*****************************************************************
Code from this tutorial and all my others can be found on my GitHub:
https://github.com/Derrick-Sherrill/DerrickSherrill.com
Still wild I get to write these messages and get blown away by the number of people who liked a video enough to subscribe. Thank you to all 62,500 of you! Thanks for watching and hopefully the videos are helpful. Thank you all so much!
Check out my website:
https://www.derricksherrill.com/
If you liked the video - please hit the like button. It means more than you know. Thanks for watching and thank you for all your support!!
--- Channel FAQ --
What text editor do you use?
Atom - https://atom.io/
What Equipment do you use to film videos?
https://www.amazon.com/shop/derricksherrill
What editing software do you use?
Adobe CC - https://www.adobe.com/creativecloud.html
Premiere Pro for video editing
Photoshop for images
After Effects for animations
Do I have any courses available?
Yes & always working on more!
https://www.udemy.com/user/derrick-sherrill-2/
Where do I get my music?
I get all my music from the copyright free Youtube audio library
https://www.youtube.com/audiolibrary/music?nv=1
Let me know if there's anything else you want answered!
-------------------------
Always looking for suggestions on what video to make next -- leave me a comment with your project! Happy Coding!
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Level Up Python Pandas GroupBy | Five Minute Python Scripts | Subscriber Request», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.