Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CSV Filter & Prune

A Streamlit web app for filtering and cleaning CSV files with both automatic filtering and manual row exclusion.

Features

  • Upload CSV files with automatic encoding/quoting handling
  • Filter by column with three modes:
    • Equals: Exact match
    • Contains: Substring search
    • Regex: Regular expression pattern matching
  • Manual row exclusion: Tick checkboxes to exclude specific rows from the filtered results
  • Download cleaned CSV: Export your cleaned data
  • Live metrics: See row counts after filtering and exclusions

Installation

Option 1: Using uv (recommended)

No installation needed! Just run:

./run.sh

Or manually:

uv run --with streamlit --with pandas streamlit run app.py

Option 2: Traditional pip

pip install -r requirements.txt
streamlit run app.py

Usage

  1. Run the app:

    ./run.sh
  2. Open your browser (should open automatically) to http://localhost:8501

  3. Upload a CSV file

  4. Use the Filter controls:

    • Select a column to filter on
    • Choose a filter mode (equals/contains/regex)
    • Enter your search value or pattern
  5. In the data table, tick the "Exclude?" checkbox for any rows you want to remove

  6. Click "⬇️ Download cleaned CSV" to download your cleaned data

Tips

  • For very large CSVs (>1-2M rows), consider using specialized tools like Modern CSV or VisiData for better performance
  • The app caches loaded CSVs, so re-running filters is fast
  • Regex mode supports full Python regex syntax
  • The app handles malformed CSVs with fallback parsing

Example Use Cases

  • Remove duplicate or invalid entries from data exports
  • Filter contact lists by domain or keyword
  • Clean up transaction logs by date patterns
  • Manually review and exclude outliers or test data

filter-csv

About

a tool to quickly filter a csv

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages