ZERO TO DATA
banner
z2d-dev.bsky.social
ZERO TO DATA
@z2d-dev.bsky.social
👨‍💻 I’m Max — Data Scientist & Pythonista (10+ yrs coding, 6+ yrs pro).
Sharing 🐍 Python best practices, 📊 data science, ⚡tips & 🛠️ workflows (IDE, CI/CD, debugging).
🎯 Level up in data dev! 🚀
📺 YouTube: youtube.com/@z2d_io
• Programmatic expressions run in parallel

⚙️ [ (pl.col("price") * s).alias(f"price_x{s}") for s in [1.1, 1.2, 1.3] ] → generate scaled columns dynamically
November 8, 2025 at 4:12 PM
• Use namespaces like .str and .dt for string & time features

🧩 pl.col("drink").str.starts_with("Latte") → flag latte drinks
🕒 pl.col("timestamp").dt.weekday() → extract weekday number

Fast, composable, and production-ready 💪
November 8, 2025 at 4:11 PM
• Arithmetic with expressions:

❌ pl.col("price") * pl.col("quantity") -> shadowing
✅ (pl.col("price") * pl.col("quantity")).alias("revenue")

Build KPIs and metrics directly in with_columns([...]) — computed in parallel and clearly named.
November 8, 2025 at 4:09 PM
• clean conditional logic

pl.when(
pl.col("price") > 3
).then(
pl.lit("expensive")
).otherwise(
pl.lit("cheap)
)

→ replace if/else with fast, readable expressions
November 8, 2025 at 4:07 PM
➕ Module 4 – Data Manipulations with Expressions in Polars

Learn how to create & modify columns the Polars way using df.with_columns([...]).

▶️ Watch: www.youtube.com/watch?v=4jQO...

#Polars #Python #DataScience
November 8, 2025 at 4:04 PM
🎯 Module 3 – Selecting & Filtering Data

... the Polars way:

🧩 pl.col() – expressive columns
🧮 .select() – choose/transform columns
🔍 .filter() – keep matching rows

Chaining:
df.filter(pl.col("city")=="Austin").select("drink","price")

▶️ Watch: youtu.be/gemLXW-hkJM

#Polars #Python #DataScience
October 27, 2025 at 3:30 PM
📊 Module 2 – Your First Polars DataFrame 🚀

In this new video, we create our first Polars DataFrame, build datasets, explore data, cover I/O with CSV and Parquet & uncover one common CSV pitfall beginners face.

▶️ Watch: youtu.be/kdZgrMHT23k?...

#Polars #Python #LearnDataScience #PolarsForBeginners
Polars for Beginners: DataFrames Made Simple and Fast
YouTube video by ZERO TO DATA
youtu.be
October 26, 2025 at 4:05 PM
📘 Module 1 – Setup Polars FAST ⚡ with uv

Learn how to get Polars running in minutes.
We’ll install Polars, manage Python 3.13 with uv, and set up Jupyter for your first DataFrame.

▶️ Watch: youtu.be/HG9H5WimRwg?...

#Python #Polars #Setup
Set Up Polars Blazingly Fast (with uv + Python 3.13)
YouTube video by ZERO TO DATA
youtu.be
October 25, 2025 at 4:27 PM
Takeaways:

• Use a decorator-factory pattern for flexible config
• Be friendly - add exponential backoff to avoid retry storms
• Don’t retry forever

Curious how you handle retries — do you build your own or rely on a library?

🔗 z2d.io/posts/produc...

#Python #DevTips
Retry — Production-Ready Python Decorators
Learn how to implement and use retry decorators in Python — from building your own exponential backoff logic to leveraging powerful libraries like Tenacity and Stamina.
z2d.io
October 5, 2025 at 8:55 PM
📊 Benchmarks:

Naive Python → ~48s

Polars-native → ~2.8s

That’s ~17× faster on 1M rows × 500-dim embeddings.

Full tutorial + code 👉 z2d.io/posts/polars...

#Python #Polars #DataScience #Vectorization
z2d.io
September 20, 2025 at 1:14 PM
1️⃣ Start simple: `map_elements` with a custom cosine fn → easy to read, but slow.

2️⃣ Optimize: cast to `pl.Array` → unlocks Polars’ Rust engine for vector ops.

Result: same math, fully vectorized & much faster.
September 20, 2025 at 1:12 PM