Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Filter by Categories
About Article
Analyze Data
Archive
Best Practices
Better Outputs
Blog
Code Optimization
Code Quality
Command Line
Course
Daily tips
Dashboard
Data Analysis & Manipulation
Data Engineer
Data Visualization
DataFrame
Delta Lake
DevOps
DuckDB
Environment Management
Feature Engineer
Git
Jupyter Notebook
LLM
LLM Tools
Machine Learning
Machine Learning & AI
Machine Learning Tools
Manage Data
MLOps
Natural Language Processing
Newsletter Archive
NumPy
Pandas
Polars
PySpark
Python Helpers
Python Tips
Python Utilities
Scrape Data
SQL
Testing
Time Series
Tools
Visualization
Visualization & Reporting
Workflow & Automation
Workflow Automation

Newsletter #243: Turn Your ML Tests Into Plain English with Behave

Newsletter #243: Turn Your ML Tests Into Plain English with Behave


๐Ÿ“… Today’s Picks

Turn Your ML Tests Into Plain English with Behave

Code example: Turn Your ML Tests Into Plain English with Behave

Problem

Unit testing matters in data science, but writing tests that business stakeholders can actually understand is a challenge.

If they can’t read the tests, they can’t confirm the logic matches business expectations.

Solution

Behave turns test cases into plain-English specifications using the Given/When/Then format.

How to use Behave for readable tests:

  • Write .feature files with Given/When/Then syntax
  • Implement steps in Python using @given, @when, @then decorators
  • Run “behave” to execute tests

This lets technical and business teams stay aligned without confusion.


Build Powerful Data Pipelines with DuckDB + pandas

Code example: Build Powerful Data Pipelines with DuckDB + pandas

Problem

Pandas is great for data cleaning and feature engineering, while SQL excels at complex aggregations.

But moving data from pandas to a database and back can be tedious.

Solution

DuckDB solves this by letting you run SQL directly on pandas DataFrames and return the results back into pandas for further analysis.


โ˜•๏ธ Weekly Finds

feast [MLOps] – Open source feature store for machine learning that manages existing infrastructure to productionize ML models with fast data consistency and leakage prevention

git-who [Python Utils] – CLI tool for industrial-scale git blaming that shows who is responsible for entire components or subsystems in your codebase, not just individual lines

organize [Python Utils] – File management automation tool for safe moving, renaming, copying files with conflict resolution, duplicate detection, and Exif tag extraction

Looking for a specific tool? Explore 70+ Python tools โ†’

Stay Current with CodeCut

Actionable Python tips, curated for busy data pros. Skim in under 2 minutes, three times a week.

Leave a Comment

Your email address will not be published. Required fields are marked *

0
    0
    Your Cart
    Your cart is empty
    Scroll to Top

    Work with Khuyen Tran

    Work with Khuyen Tran