Skip to content

About

A simple Python tool to remove duplicate CSV rows

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

CSV Cleaner

A Python command-line tool to clean CSV files.

Features

  • Removes duplicate rows
  • Trims leading and trailing spaces
  • Reports empty cells in each column
  • Sorts rows in ascending or descending order
  • Handles missing input files
  • Prevents using the same input and output file
  • Includes automated tests

Requirements

  • Python 3

Usage

Remove duplicates:

python csv_cleaner.py input.csv output.csv

Sort by name:

python csv_cleaner.py input.csv output.csv --sort name

Sort in descending order:

python csv_cleaner.py input.csv output.csv --sort name --descending

Trim extra spaces:

python csv_cleaner.py input.csv output.csv --trim-spaces

Report empty cells:

python csv_cleaner.py input.csv output.csv --report-empty

Combine options:

python csv_cleaner.py input.csv output.csv --trim-spaces --report-empty --sort name

Run tests

python -m unittest discover -s tests -v

About

A simple Python tool to remove duplicate CSV rows

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages