Narwhals: One Function for pandas, Polars, and DuckDB
Plus uv pin for seamless Python upgrades
Grab your coffee. Here are this week’s highlights.
📅 Today’s Picks
Narwhals: One Function for pandas, Polars, and DuckDB
Problem
Teams today use multiple DataFrame libraries side by side. Each backend has its own syntax, so your utility functions end up full of if/elif chains checking types.
This makes even small logic changes expensive, since every backend implementation must be updated.
Solution
Narwhals removes this complexity by providing a unified DataFrame API.
How it works:
Wrap any DataFrame with
nw.from_native()(pandas, Polars, DuckDB, PySpark, PyArrow)Write transformations once using Polars-style operations
Convert back to the original type with
nw.to_native()Zero extra dependencies. Each backend keeps its native performance
📖 View Full Article | 🧪 Run code | ⭐ View GitHub
uv: Switch Python Versions Without Rebuilding Environments
Problem
Switching Python versions typically requires recreating virtual environments and reinstalling all dependencies from scratch.
This workflow wastes time and can introduce version conflicts when dependencies need to be resolved again.
Solution
UV allows seamless Python version upgrades with uv python pin while preserving existing dependencies.
The process is simple:
Pin the version with uv python pin 3.x
Sync dependencies with uv sync
All cached packages are preserved automatically
📖 View Full Article | ⭐ View GitHub
☕️ Weekly Finds
Airbyte [Data Engineering] - Data integration platform with 600+ connectors for ETL/ELT pipelines from APIs, databases, and files to warehouses and lakes
act [DevOps] - Run GitHub Actions locally for fast feedback without commit/push cycles, using Docker containers
Dash [AI Agents] - Self-learning text-to-SQL agent that grounds answers in six layers of context and improves automatically from failures
📚 Latest Deep Dives
5 Python Tools for Structured LLM Outputs: A Practical Comparison - Compare 5 Python tools for structured LLM outputs. Learn when to use Instructor, PydanticAI, LangChain, Outlines, or Guidance for JSON extraction.
Before You Go
🔍 Explore More on CodeCut
Tool Selector - Discover 70+ Python tools for AI and data science
Production Ready Data Science - A practical book for taking projects from prototype to production
💬 Rate Your Experience
How would you rate your newsletter experience? Share your feedback →


