4 Pandas Functions That I Wish I Knew Earlier

  Рет қаралды 23,972

Coding Is Fun

Coding Is Fun

Күн бұрын

👉 Explore All My Excel Solutions: pythonandvba.com/solutions
𝗗𝗘𝗦𝗖𝗥𝗜𝗣𝗧𝗜𝗢𝗡
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
In this video, I'm going to share with you 4 Pandas functions that I wish I knew earlier. These functions will make data analysis much easier and faster for you!
Download the Jupyter Notebook here:
► github.com/Sven-Bo/four-panda...
𝗧𝗢𝗢𝗟𝗦 𝗔𝗡𝗗 𝗥𝗘𝗦𝗢𝗨𝗥𝗖𝗘𝗦
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
🆓【𝗙𝗥𝗘𝗘】Excel Add-in (𝗠𝘆𝗧𝗼𝗼𝗹𝗕𝗲𝗹𝘁): pythonandvba.com/mytoolbelt
📊 Dashboard Excel Add-In (𝗚𝗿𝗮𝗳𝗹𝘆): pythonandvba.com/grafly
🎨 Cartoon Charts Excel Add-In (𝗖𝘂𝘁𝗲𝗣𝗹𝗼𝘁𝘀): pythonandvba.com/cuteplots
🤪 Fun Emoji Excel Add-In (𝗘𝗺𝗼𝗷𝗶𝗳𝘆): pythonandvba.com/emojify
📑 Excel Templates: pythonandvba.com/go/excel-tem...
🎓 My Courses: pythonandvba.com/go/courses
📚 Books, Tools, and More: pythonandvba.com/resources
𝗖𝗢𝗡𝗡𝗘𝗖𝗧 𝗪𝗜𝗧𝗛 𝗠𝗘
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
🔗 LinkedIn: / sven-bosau
📸 Instagram: / codingisfun_official
💻 GitHub: github.com/Sven-Bo
💬 Discord: pythonandvba.com/discord
📬 Contact: pythonandvba.com/contact
☕ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲?
If you want to support this channel, you can buy me a coffee here: pythonandvba.com/coffee-donation

Пікірлер: 116
@CodingIsFun
@CodingIsFun 2 жыл бұрын
*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 11 ай бұрын
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 11 ай бұрын
Happy to hear that you learned something new. Thanks for watching and leaving a comment
@cryptomugen1315
@cryptomugen1315 2 жыл бұрын
short and straight to the point. need more of these 4 min tips! thank you
@CodingIsFun
@CodingIsFun 2 жыл бұрын
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) 😃
@whatisagoodusernamehere
@whatisagoodusernamehere 8 ай бұрын
Wow! What a revelation! Great video! I think this format deserves a whole playlist!
@CodingIsFun
@CodingIsFun 8 ай бұрын
Appreciate your comment! Glad you found the video enjoyable. 👍
@Asparuh.Emilov
@Asparuh.Emilov 2 жыл бұрын
That was amazing!!!!! Thank you so much! Your videos are truly meaningful! ❤️❤️❤️
@CodingIsFun
@CodingIsFun 2 жыл бұрын
You are so welcome! Glad you like them. Thanks for watching & taking the time to leave a comment! ❤
@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!
@sandrakyoutube
@sandrakyoutube 5 ай бұрын
Another great video. 👍 Flatten the multiindex and the cut func are new to me. Will serve me well! Thank you!
@CodingIsFun
@CodingIsFun 5 ай бұрын
Happy to hear that you enjoyed this one too! Thanks for the comments and support, as always! ✌️
@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. 👍
@hnclienteshn4501
@hnclienteshn4501 2 жыл бұрын
Thank you very much for your tips, they are really very useful, excellent for continuing to share !!
@CodingIsFun
@CodingIsFun 2 жыл бұрын
A pleasure! Thanks for watching the video & 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! :)
@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! :)
@MrChristian902
@MrChristian902 8 ай бұрын
Great tips, thanks! I was making many of these things the "Hard way "
@CodingIsFun
@CodingIsFun 8 ай бұрын
Thanks for the positive feedback! Appreciate you taking the time to leave a comment.
@tuxib
@tuxib 10 ай бұрын
Thank you for some very useful tips. I didn't know of the nlargest & nsmallest functions so thanks for sharing those
@CodingIsFun
@CodingIsFun 10 ай бұрын
An absolute pleasure, very happy to hear that you learned something new! Happy Coding! :)
@jqts6490
@jqts6490 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
Glad you liked the Pandas tips! Thank you very much for watching the video & sharing your Pandas trick! 🐼 Happy Coding! 💪
@valensrwema4251
@valensrwema4251 2 жыл бұрын
Amazing tips 👌 I really appreciate it.
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thank you very much! Glad you liked the tips. 😃
@KhalilYasser
@KhalilYasser 2 жыл бұрын
Thank you very much for your amazing tutorials.
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thank you as always Yasser Khalil, your support is much appreciated! 👍
@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! :)
@l--1226
@l--1226 Жыл бұрын
Wonderfully done, Thanks
@CodingIsFun
@CodingIsFun Жыл бұрын
Glad to hear you liked it! Thank you for commenting and watching.
@upalkundu2872
@upalkundu2872 2 жыл бұрын
Really helpful. Gonna save my hours of hard work :")
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Glad to hear & thanks for watching the video! 😃
@vivdroid
@vivdroid 2 жыл бұрын
Your tips are awesome 👏
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thank you very much! Glad it was helpful!
@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!
@bashar9200
@bashar9200 Жыл бұрын
Fantastic!! Thank you
@CodingIsFun
@CodingIsFun Жыл бұрын
Glad to hear you liked it! Thank you for commenting and watching.
@ermalgashimramori
@ermalgashimramori 2 жыл бұрын
Great content as always.
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thank you very much! ❤ I genuinely appreciate your support! 💪
@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!
@gitgosc7075
@gitgosc7075 2 жыл бұрын
wow, query() is completly new for me, awesome, thanks
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thanks for watching the video & your comment! :)
@JUN1ORLYONN
@JUN1ORLYONN 2 жыл бұрын
Great video!!
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Glad you enjoyed it! Thanks for watching :)
@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 KZbin. For now, I will stick to office (Excel) automation, visualisations fun Python projects :)
@StalkedHuman
@StalkedHuman 2 ай бұрын
These are the same functions i was feeling i needed to learn to get the function i needed
@CodingIsFun
@CodingIsFun 2 ай бұрын
Glad it was helpful! Cheers, Sven ✌️
@doubando
@doubando 6 ай бұрын
Thanks this is great, i like the agg() and cut()
@CodingIsFun
@CodingIsFun 6 ай бұрын
Cool that you learned something new. Thanks for tuning in!
@user-qp8ei8lc3d
@user-qp8ei8lc3d 2 жыл бұрын
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 2 жыл бұрын
Thank you for watching the video & great suggestion! I cannot make any promises, but l will see what I can do.
@noeldoller2958
@noeldoller2958 2 жыл бұрын
Very good short cut code.
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thank you very much! 😃
@chandraprakash934
@chandraprakash934 Жыл бұрын
Amazing !
@CodingIsFun
@CodingIsFun Жыл бұрын
Glad you liked it. Thanks for watching and taking the time to leave a comment!
@akshitabatra2500
@akshitabatra2500 4 ай бұрын
Great Video :)
@CodingIsFun
@CodingIsFun 4 ай бұрын
Glad to hear you liked it! Thank you for commenting and watching. Cheers, Sven ✌️
@user-jh4wo6ok4s
@user-jh4wo6ok4s Жыл бұрын
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!
@aliarshad111
@aliarshad111 5 ай бұрын
Informative
@CodingIsFun
@CodingIsFun 5 ай бұрын
Glad you liked it. Thanks for watching. Cheers, Sven ✌️
@marcelocampos665
@marcelocampos665 7 ай бұрын
Excelente!
@CodingIsFun
@CodingIsFun 7 ай бұрын
Thanks! :)
@pedromerl
@pedromerl 6 ай бұрын
THANK YOU!
@CodingIsFun
@CodingIsFun 6 ай бұрын
My pleasure! Appreciate you taking the time to watch and leave a comment.
@__________________________6910
@__________________________6910 2 жыл бұрын
Thanks man
@CodingIsFun
@CodingIsFun 2 жыл бұрын
My pleasure! Thanks for taking the time to 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
@Wilhuf1
@Wilhuf1 11 ай бұрын
Didn’t know nsmallest and nlargest, along with cut. Great vid, thanks!
@CodingIsFun
@CodingIsFun 11 ай бұрын
Happy to hear that it was useful; thank you for taking the time to leave a comment and for watching the video!
@LouisDuran
@LouisDuran 3 ай бұрын
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 3 ай бұрын
Thanks for watching! 👍Cheers, Sven ✌️
@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
@omkarhankare3264
@omkarhankare3264 2 жыл бұрын
Thanks 🐱
@CodingIsFun
@CodingIsFun 2 жыл бұрын
A pleasure! Thank you for watching the video! :)
@m4meeran
@m4meeran 2 жыл бұрын
Cut and float('inf') was new for me
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thanks for watching the video! :)
@m4meeran
@m4meeran 2 жыл бұрын
@@CodingIsFun looking forward for more interesting videos like this.
@bodyart1460
@bodyart1460 Жыл бұрын
Thank you
@CodingIsFun
@CodingIsFun Жыл бұрын
My pleasure! Appreciate you taking the time to watch and leave a comment. 👍
@newday8074
@newday8074 Жыл бұрын
Wow thank you
@CodingIsFun
@CodingIsFun Жыл бұрын
My pleasure! Appreciate you taking the time to watch and leave a comment.
@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!
@asankacool1
@asankacool1 2 жыл бұрын
@CodingIsFun Using aggregate function, how to get an aggregate reject% (defects/production)? df columns are |date | production| defects|
@CodingIsFun
@CodingIsFun 2 жыл бұрын
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 2 жыл бұрын
@@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 2 жыл бұрын
@@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
@Apoorvpandey
@Apoorvpandey Жыл бұрын
I really wish I knew these earlier
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching the video and your comment! :)
@suryaryali4434
@suryaryali4434 8 ай бұрын
Can you make while video on lambda
@CodingIsFun
@CodingIsFun 8 ай бұрын
Thanks for watching and your suggestion!
@djangoworldwide7925
@djangoworldwide7925 6 ай бұрын
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 6 ай бұрын
Never used R, so I would need to look up what those tools can do :)
@deepakmehra8627
@deepakmehra8627 2 жыл бұрын
Cut is new for me..
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thanks for watching the video :)
@pritomroy2465
@pritomroy2465 Жыл бұрын
as.index = False for flatten the data set
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching the video and sharing your pandas tip! 👍
My top 25 pandas tricks
27:38
Data School
Рет қаралды 266 М.
Top 10 Pandas Tips and Tricks
18:50
Martin Bel
Рет қаралды 1,9 М.
Gym belt !! 😂😂  @kauermtt
00:10
Tibo InShape
Рет қаралды 17 МЛН
What it feels like cleaning up after a toddler.
00:40
Daniel LaBelle
Рет қаралды 83 МЛН
DEFINITELY NOT HAPPENING ON MY WATCH! 😒
00:12
Laro Benz
Рет қаралды 64 МЛН
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 10 МЛН
Polars Is The Faster Pandas
8:53
NeuralNine
Рет қаралды 12 М.
NumPy vs Pandas
5:55
IBM Technology
Рет қаралды 144 М.
Pandas Query Filter Function Guide [Beginner Friendly]
14:46
Ryan Nolan Data
Рет қаралды 3,2 М.
Starting a Career in Data Science (10 Thing I Wish I Knew…)
10:42
Sundas Khalid
Рет қаралды 161 М.
5 Little Known Pandas Features 🤓
7:01
Coding Is Fun
Рет қаралды 9 М.
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
Rob Mulla
Рет қаралды 264 М.
FASTEST Way to Become a Data Analyst and ACTUALLY Get a Job
10:55
Stefanovic
Рет қаралды 3 МЛН
Become a Pandas Pro: Learn Data Analysis with Python 🤓
19:05
Coding Is Fun
Рет қаралды 10 М.
Pandas Functions: Apply vs. Map vs. Applymap
11:53
Mısra Turp
Рет қаралды 24 М.
Gym belt !! 😂😂  @kauermtt
00:10
Tibo InShape
Рет қаралды 17 МЛН