Nice video, thx! More information about query: - u can check value in column is in the list using 2 methods: query('col1 in @list_') or less logical query('col1 == @list_') - u can use keywords AND, OR, NOT instead of operators &,|,~ - u can use straightforwardly pandas built-in methods (include string and date ones): query('col1.str.contains("A") and col2.dt.year==2024 and not col3.isna()')
Most welcome! And yes! You can use "and" / "or" instead. I prefer sticking with & / | since that's what you need to use in a pandas mask. For example df[(df.height >= 3) and (df['weight (g)'] >= 100)] does not work, you must use & in that case, but query will accept either.
Great question! I haven’t tested it myself, but my understanding is that mask is faster if you have 5 or less subconditions. After that, it’s pretty much a draw. stackoverflow.com/questions/53227279/difference-between-masking-and-querying-pandas-dataframe
Hello mam....i have error in seaborn i type import seaborn as sns than i press only run without any entering datafram etc so there coming error I not getting proper solution I uploaded video short in my channel
That certainly is an interesting error! 😅 I'm not sure what's going on, but I would try restarting your notebook, potentially uninstalling and reinstalling seaborn, and making sure Jupyter Notebook has the right path to your packages.
Nice video, thx! More information about query:
- u can check value in column is in the list using 2 methods:
query('col1 in @list_') or less logical query('col1 == @list_')
- u can use keywords AND, OR, NOT instead of operators &,|,~
- u can use straightforwardly pandas built-in methods (include string and date ones):
query('col1.str.contains("A") and col2.dt.year==2024 and not col3.isna()')
Excellent - lots of great options for query! 😄
it's a great video, thanks for sharing it, Kimberly!
Thanks! Glad you liked it! 😁
Awesome thanks subscribed
Excellent - welcome aboard! 👍
Thank you. Insightful and Impressive.
So glad you liked it!
Thanks for the concise explanation, Kim!
Most welcome! Glad you enjoyed it! 😊
Nice job. The use of the @ symbol is slick. Thanks!
Right? I love that little @ symbol. 😀
Nice video! I always learn something after watching your videos. Thanks!
Oh thank you! Glad you learned some thing new 😄
Nice explanation. I will like to see lambda function in pandas in the nearest future. Welldone 👍
Oh that's another good one - thanks for the suggestion! Cheers 😃
Thanks, that was helpful.
Great! Glad that helped. 😄
very good bravooo
Why thank you! I appreciate it 👍
Great video, thanks! Can you use and or instead of & | in the query method?
Most welcome! And yes! You can use "and" / "or" instead. I prefer sticking with & / | since that's what you need to use in a pandas mask. For example df[(df.height >= 3) and (df['weight (g)'] >= 100)] does not work, you must use & in that case, but query will accept either.
@ thank you for the reply and explanation.
This video was very, very great
Thank you very much
Will you be uploading new videos? 😊
So glad you enjoyed it! Yes, hopefully some new videos soon!
Is there a possibility that you could start a machine learning course (from beginner to advanced)
Thanks for the suggestion! I’ve been considering more data science/ML videos
Which runs faster, mask or query?
Great question! I haven’t tested it myself, but my understanding is that mask is faster if you have 5 or less subconditions. After that, it’s pretty much a draw. stackoverflow.com/questions/53227279/difference-between-masking-and-querying-pandas-dataframe
Hi dear! How are you? Do you teach JavaScript also?
Hi there 👋 I have dabbled in JavaScript but not substantially. So to answer your question, not at this time!
Hello mam....i have error in seaborn i type
import seaborn as sns than i press only run without any entering datafram etc so there coming error
I not getting proper solution
I uploaded video short in my channel
That certainly is an interesting error! 😅 I'm not sure what's going on, but I would try restarting your notebook, potentially uninstalling and reinstalling seaborn, and making sure Jupyter Notebook has the right path to your packages.
@@KimberlyFessel thank you mam for answering
I find conditional row selection in square brackets the ugliest thing.
The Pandas team seem to override every [] with their own functions.
Yup - query is a great alternative to [ ], though admittedly, I'm a habitual [ ]-er myself 😆
@@KimberlyFessel 🤣