Українська
Відкрити в Telegram

Пост My favorite way to work with multiple filters in pandas.Series — not a chain of .loc, but a single mask. 🐼

23 червня 2026
M
Machine Learning with Python
Посилання
натисніть — покажемо
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: 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
7 · 3.9K ·

Поруч у стрічці

MMachine Learning with PythonLearn AI for free directly from top companies. 🚀 1 - Anthropic: anthropic.skilljar.com 2 - Google: grow.google/ai 3 - Meta: ai.meta.com/resources/ 4 - NVIDIA: d
це повідомлення
MMachine Learning with PythonGuide to scalable system design and interviews 🚀📊 https://github.com/karanpratapsingh/system-design #SystemDesign #Scalability #TechInterviews #SoftwareEngineerMMachine Learning with PythonCurated list of distributed systems papers and books 📚📖 https://github.com/theanalyst/awesome-distributed-systems ✨ Join Best TG Channels https://t.me/addlist/0
MMachine Learning with PythonMachine Learning with Python@CodeProgrammer · канал · Технології
68 610підписників2 592середнє охоплення поста
Стрічка майданчика Відкрити в Telegram

Відкрита публічна стрічка з пошукового індексу ChatCrawler — «Google по публічному Telegram»; оновлюється в міру обходу майданчика. Час — UTC.

Лише публічний контент, офіційний API Telegram. Про проєкт · Питання · Межі індексу · Прибрати сторінку з видачі · Каталог · Пошук · Як ми рахуємо