Skip to content

guillermodotn/flowview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flowview

CI PyPI Python License

Visual data pipeline debugger for Polars. Stop print-debugging your pipelines.

flowview demo

Install

pip install flowview

Usage

Add @fv.trace to any function that transforms a Polars DataFrame. flowview traces every method call and renders a visual flow in your terminal.

import polars as pl
import flowview as fv

@fv.trace
def process(df: pl.DataFrame) -> pl.DataFrame:
    return (
        df.filter(pl.col("status") == "active")
          .with_columns((pl.col("price") * pl.col("quantity")).alias("revenue"))
          .group_by("category")
          .agg(pl.col("revenue").sum().alias("total_revenue"))
          .sort("total_revenue", descending=True)
    )

.pipe() chains are also supported:

@fv.trace
def process(df: pl.DataFrame) -> pl.DataFrame:
    return df.pipe(clean).pipe(filter_active).pipe(add_revenue)

Each step shows:

  • Row counts with diffs
  • Schema changes (added/removed columns)
  • Sample data at each transformation
  • Execution time per step

Options

@fv.trace(sample_rows=3, show_sample=True, show_schema=True)
def process(df):
    ...

About

Visual data pipeline debugger for Polars.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages