Тёмный

4 Pandas Functions That I Wish I Knew Earlier 

Coding Is Fun
Подписаться 100 тыс.
Просмотров 25 тыс.
50% 1

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

 

2 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 120   
@CodingIsFun
@CodingIsFun 3 года назад
*Let me know which function was new for you, or even better, share your favourite pandas trick in the comments.*
@smbatharutyunyan5042
@smbatharutyunyan5042 2 года назад
pd.cut is new for me, and is very useful. Thanks !!!
@BlueSkyGoldSun
@BlueSkyGoldSun 2 года назад
Query Can we plot the conditional query ?
@CodingIsFun
@CodingIsFun 2 года назад
@@BlueSkyGoldSun Can you perhaps elaborate on what it is you're actually trying to achieve? Please provide some additional info. Thanks!
@YYZ722
@YYZ722 Год назад
The query function is new to me. It is similar to applying filters on the database, but definitely faster for generating results. Thank you for sharing!
@CodingIsFun
@CodingIsFun Год назад
Happy to hear that you learned something new. Thanks for watching and leaving a comment
@cryptomugen1315
@cryptomugen1315 3 года назад
short and straight to the point. need more of these 4 min tips! thank you
@CodingIsFun
@CodingIsFun 3 года назад
Thank you! Glad you liked the video. Today I will upload a 4min tips video on how to use Python's Pathlib module (to work with file paths & directories in Python) 😃
@boris1375
@boris1375 Месяц назад
Thanks! This is great. I was often frustrated heavy boolean filtering. Now I ll use the query method!
@CodingIsFun
@CodingIsFun Месяц назад
Query is indeed very handy. I'm using it quite often. Thanks for watching! -Sven ✌️
@marsshakirov4507
@marsshakirov4507 2 года назад
Thank you very much! If you are looking for ideas, please do video about advanced combinations of groupby function and other methods. Anyway, thank you for short description in this video too :)
@CodingIsFun
@CodingIsFun 2 года назад
Thanks for watching the video and your suggestion. I appreciate it! :)
@Asparuh.Emilov
@Asparuh.Emilov 3 года назад
That was amazing!!!!! Thank you so much! Your videos are truly meaningful! ❤️❤️❤️
@CodingIsFun
@CodingIsFun 3 года назад
You are so welcome! Glad you like them. Thanks for watching & taking the time to leave a comment! ❤
@userhandle-u7b
@userhandle-u7b Год назад
thanks a lot. very useful. You also showed the old way.
@CodingIsFun
@CodingIsFun Год назад
An absolute pleasure, very happy to hear that you found it useful!
@l--1226
@l--1226 Год назад
Wonderfully done, Thanks
@CodingIsFun
@CodingIsFun Год назад
Glad to hear you liked it! Thank you for commenting and watching.
@bashar9200
@bashar9200 Год назад
Fantastic!! Thank you
@CodingIsFun
@CodingIsFun Год назад
Glad to hear you liked it! Thank you for commenting and watching.
@datamonster3212
@datamonster3212 Год назад
How did you make the jupyter sections collapsible? Looks neat!
@CodingIsFun
@CodingIsFun Год назад
Check out collapsible headings: towardsdatascience.com/10-essential-jupyter-notebook-extensions-for-data-scientists-86b68ec7a66e
@sawyer82nd
@sawyer82nd 2 года назад
Fantastisch! Kurz und sehr informativ! I've been using Pandas for a few months now and everything in this except groupby() was new to me. I can't believe I've watched two Pandas tutorials and this is the first time I've learned about query().
@CodingIsFun
@CodingIsFun 2 года назад
Super, das freut mich zu hören! :) Thanks for watching and taking the time to leave a comment!
@andybecker5001
@andybecker5001 Год назад
Never used cut before. Definitely a time saver if you need sub categories
@CodingIsFun
@CodingIsFun Год назад
Glad it was helpful and that you learned something new. Thanks for watching and taking the time to leave a comment!
@upalkundu2872
@upalkundu2872 3 года назад
Really helpful. Gonna save my hours of hard work :")
@CodingIsFun
@CodingIsFun 3 года назад
Glad to hear & thanks for watching the video! 😃
@LouisDuran
@LouisDuran 6 месяцев назад
Coming from a T-SQL background a lot of these functions seem to "make sense" as in they are idiomatic to what I wish to do with datasets. But I am glad to see working examples of this.
@CodingIsFun
@CodingIsFun 5 месяцев назад
Thanks for watching! 👍Cheers, Sven ✌️
@whatisagoodusernamehere
@whatisagoodusernamehere 11 месяцев назад
Wow! What a revelation! Great video! I think this format deserves a whole playlist!
@CodingIsFun
@CodingIsFun 10 месяцев назад
Appreciate your comment! Glad you found the video enjoyable. 👍
@djangoworldwide7925
@djangoworldwide7925 8 месяцев назад
As an R user I must say you guys miss so much of dpkyr, tidyr and other powerful tools (such as inequality joins)
@CodingIsFun
@CodingIsFun 8 месяцев назад
Never used R, so I would need to look up what those tools can do :)
@deepakmehra8627
@deepakmehra8627 3 года назад
Cut is new for me..
@CodingIsFun
@CodingIsFun 3 года назад
Thanks for watching the video :)
@m4meeran
@m4meeran 3 года назад
Cut and float('inf') was new for me
@CodingIsFun
@CodingIsFun 3 года назад
Thanks for watching the video! :)
@m4meeran
@m4meeran 3 года назад
@@CodingIsFun looking forward for more interesting videos like this.
@StalkedHuman
@StalkedHuman 4 месяца назад
These are the same functions i was feeling i needed to learn to get the function i needed
@CodingIsFun
@CodingIsFun 4 месяца назад
Glad it was helpful! Cheers, Sven ✌️
@Apoorvpandey
@Apoorvpandey 2 года назад
I really wish I knew these earlier
@CodingIsFun
@CodingIsFun 2 года назад
Thanks for watching the video and your comment! :)
@doubando
@doubando 9 месяцев назад
Thanks this is great, i like the agg() and cut()
@CodingIsFun
@CodingIsFun 9 месяцев назад
Cool that you learned something new. Thanks for tuning in!
@suryaryali4434
@suryaryali4434 10 месяцев назад
Can you make while video on lambda
@CodingIsFun
@CodingIsFun 10 месяцев назад
Thanks for watching and your suggestion!
@pritomroy2465
@pritomroy2465 Год назад
as.index = False for flatten the data set
@CodingIsFun
@CodingIsFun Год назад
Thanks for watching the video and sharing your pandas tip! 👍
@sohambhattacharjee951
@sohambhattacharjee951 Год назад
This was truly helpful.
@CodingIsFun
@CodingIsFun Год назад
Happy to hear that it was useful; thank you for taking the time to leave a comment and for watching the video!
@samaritan5197
@samaritan5197 2 года назад
Hi Sven, once again saw ur informative video. How to write SQL query displaying strings (select * from friend LIKE %string %) using pandas. I tried with str.contains but literally failed..
@CodingIsFun
@CodingIsFun 2 года назад
This is not what pandas.query is supposed to do. Have a look at the following Stack Overflow post: stackoverflow.com/a/45866311 I hope this helps!
@omkarhankare3264
@omkarhankare3264 3 года назад
Thanks 🐱
@CodingIsFun
@CodingIsFun 3 года назад
A pleasure! Thank you for watching the video! :)
@elu1
@elu1 Месяц назад
float("inf") is cool
@CodingIsFun
@CodingIsFun Месяц назад
Glad it was helpful! - Sven ✌️
@aliarshad111
@aliarshad111 7 месяцев назад
Informative
@CodingIsFun
@CodingIsFun 7 месяцев назад
Glad you liked it. Thanks for watching. Cheers, Sven ✌️
@akshitabatra2500
@akshitabatra2500 6 месяцев назад
Great Video :)
@CodingIsFun
@CodingIsFun 6 месяцев назад
Glad to hear you liked it! Thank you for commenting and watching. Cheers, Sven ✌️
@newday8074
@newday8074 Год назад
Wow thank you
@CodingIsFun
@CodingIsFun Год назад
My pleasure! Appreciate you taking the time to watch and leave a comment.
@pedromerl
@pedromerl 8 месяцев назад
THANK YOU!
@CodingIsFun
@CodingIsFun 8 месяцев назад
My pleasure! Appreciate you taking the time to watch and leave a comment.
@yeahjustlikethat
@yeahjustlikethat 2 года назад
I learned query thru your (awesome) streamlit tutorials. Didn't know about cut, super useful. Do you know how to cut in multiple dimensions? Say in this case, gender and tip? To produce an occurrence chart?
@CodingIsFun
@CodingIsFun 2 года назад
Thank you very much for watching the video and your comment. I receive many requests for creating individual solutions. As much as I want to help, I simply do not find the time in my daily schedule to develop & test all the different requests. I hope you can understand. Thank you
@geekyprogrammer4831
@geekyprogrammer4831 2 года назад
Your videos are on the next level buddy! Keep it up. But, can you start with Machine Learning and Deep Learning course only the coding part that can be understood by everyone?
@CodingIsFun
@CodingIsFun 2 года назад
Thanks! I was thinking about doing some Machine Learning tutorials, but I think there are already many excellent tutorials here on RU-vid. For now, I will stick to office (Excel) automation, visualisations fun Python projects :)
@chandraprakash934
@chandraprakash934 Год назад
Amazing !
@CodingIsFun
@CodingIsFun Год назад
Glad you liked it. Thanks for watching and taking the time to leave a comment!
@bodyart1460
@bodyart1460 Год назад
Thank you
@CodingIsFun
@CodingIsFun Год назад
My pleasure! Appreciate you taking the time to watch and leave a comment. 👍
@Wilhuf1
@Wilhuf1 Год назад
Didn’t know nsmallest and nlargest, along with cut. Great vid, thanks!
@CodingIsFun
@CodingIsFun Год назад
Happy to hear that it was useful; thank you for taking the time to leave a comment and for watching the video!
@zak_9351
@zak_9351 Год назад
Thank you for some very useful tips. I didn't know of the nlargest & nsmallest functions so thanks for sharing those
@CodingIsFun
@CodingIsFun Год назад
An absolute pleasure, very happy to hear that you learned something new! Happy Coding! :)
@sandrakyoutube
@sandrakyoutube 8 месяцев назад
Another great video. 👍 Flatten the multiindex and the cut func are new to me. Will serve me well! Thank you!
@CodingIsFun
@CodingIsFun 8 месяцев назад
Happy to hear that you enjoyed this one too! Thanks for the comments and support, as always! ✌️
@marcelocampos665
@marcelocampos665 9 месяцев назад
Excelente!
@CodingIsFun
@CodingIsFun 9 месяцев назад
Thanks! :)
@SantoRedentor
@SantoRedentor 2 года назад
Thank you so much! Gotta go use the nlargest right now! It solves a problem that I have at the moment.
@CodingIsFun
@CodingIsFun 2 года назад
Glad I could help! Thanks for watching and taking the time to leave a comment! :)
@mazkaibil9108
@mazkaibil9108 Год назад
Amazing work! Thank you! I love your videos! Your videos have made my life easier. Most functions were new to me.
@CodingIsFun
@CodingIsFun Год назад
Hi Maz Kaibil, thanks so much for your kind words! I'm really glad to hear that my videos have been helpful and that you've learned some new things from them. It's always great to hear when my content has made a positive impact on someone's life. 👍
@gitgosc7075
@gitgosc7075 2 года назад
wow, query() is completly new for me, awesome, thanks
@CodingIsFun
@CodingIsFun 2 года назад
Thanks for watching the video & your comment! :)
@user-qp8ei8lc3d
@user-qp8ei8lc3d 3 года назад
Very good! Could you make a tutorial on data handling inside def, for loop functions? I wanted to know the importance of putting lines of code inside def functions for optimization.
@CodingIsFun
@CodingIsFun 3 года назад
Thank you for watching the video & great suggestion! I cannot make any promises, but l will see what I can do.
@hnclienteshn4501
@hnclienteshn4501 3 года назад
Thank you very much for your tips, they are really very useful, excellent for continuing to share !!
@CodingIsFun
@CodingIsFun 3 года назад
A pleasure! Thanks for watching the video & taking the time to leave a comment! ❤
@MrChristian902
@MrChristian902 10 месяцев назад
Great tips, thanks! I was making many of these things the "Hard way "
@CodingIsFun
@CodingIsFun 10 месяцев назад
Thanks for the positive feedback! Appreciate you taking the time to leave a comment.
@torque6389
@torque6389 2 года назад
Great video. Query was new to me and I’ll definitely put it to work.
@CodingIsFun
@CodingIsFun 2 года назад
Thank you and happy coding! :)
@KhalilYasser
@KhalilYasser 3 года назад
Thank you very much for your amazing tutorials.
@CodingIsFun
@CodingIsFun 3 года назад
Thank you as always Yasser Khalil, your support is much appreciated! 👍
@jqts6490
@jqts6490 3 года назад
This is awesome! Saved and liked this video. I am actually working on groupby now to better master it for visuals. Not the best at setting up filters(using number or most of the time counting strings and numbers) and then using it in my groupbys to graph them. That said here is something really cool I found out. Making a new column filter and inserting it in the position I want for better comparing df.insert(1, “new column’s name”, df[“column1”] / df[“column2”]) What the above does is inserts at index 1 a new column named whatever, and based on a condition(in this case dividing) so simple but 🤯
@jqts6490
@jqts6490 3 года назад
Also want to say LOVE the query aspect. Now every time I use pandas I will be able to practice my SQL aspect at the same time. You rock man
@CodingIsFun
@CodingIsFun 3 года назад
Glad you liked the Pandas tips! Thank you very much for watching the video & sharing your Pandas trick! 🐼 Happy Coding! 💪
@asankacool1
@asankacool1 3 года назад
@CodingIsFun Using aggregate function, how to get an aggregate reject% (defects/production)? df columns are |date | production| defects|
@CodingIsFun
@CodingIsFun 3 года назад
Thanks for watching. I guess, you want to first insert a new column with the reject_ratio. Example: df['reject_ratio'] = df['defects'] / df['production'] I hope this helps!
@asankacool1
@asankacool1 3 года назад
@@CodingIsFun If a column is added, it will give daily reject ratio. But, what i want is a cumulative % (sum['rejects']/sum['production'])
@CodingIsFun
@CodingIsFun 3 года назад
@@asankacool1, I do not know your data(frame), but perhaps you are looking for the cumsum function of pandas: pandas.pydata.org/docs/reference/api/pandas.DataFrame.cumsum.html
@valensrwema
@valensrwema 3 года назад
Amazing tips 👌 I really appreciate it.
@CodingIsFun
@CodingIsFun 3 года назад
Thank you very much! Glad you liked the tips. 😃
@vivdroid
@vivdroid 3 года назад
Your tips are awesome 👏
@CodingIsFun
@CodingIsFun 3 года назад
Thank you very much! Glad it was helpful!
@noeldoller2958
@noeldoller2958 3 года назад
Very good short cut code.
@CodingIsFun
@CodingIsFun 3 года назад
Thank you very much! 😃
@ermalgashimramori
@ermalgashimramori 3 года назад
Great content as always.
@CodingIsFun
@CodingIsFun 3 года назад
Thank you very much! ❤ I genuinely appreciate your support! 💪
@JUN1ORLYONN
@JUN1ORLYONN 3 года назад
Great video!!
@CodingIsFun
@CodingIsFun 3 года назад
Glad you enjoyed it! Thanks for watching :)
@__________________________6910
@__________________________6910 3 года назад
Thanks man
@CodingIsFun
@CodingIsFun 3 года назад
My pleasure! Thanks for taking the time to leave a comment :)
Далее
My top 25 pandas tricks
27:38
Просмотров 269 тыс.
Pandas Query Filter Function Guide [Beginner Friendly]
14:46
Провал со стеклянным хлебом…
00:41
iPhone 16 & beats 📦
00:30
Просмотров 95 тыс.
Learning Pandas for Data Analysis? Start Here.
22:50
Просмотров 102 тыс.
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
Pandas functions: merge vs. join vs. concat
16:15
Просмотров 26 тыс.
Make Your Pandas Code Lightning Fast
10:38
Просмотров 184 тыс.
Being Competent With Coding Is More Fun
11:13
Просмотров 86 тыс.
NumPy vs Pandas
5:55
Просмотров 160 тыс.