Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Procesing CSV

This is a simple script to process CSV files and perform filtering and aggregation operations on the data.

Usage

Expecting a valid data

Aggregate expected to be either avg, max, min

Filter conditions expected to come after --where, can be numerical or string conditions

python main.py --file <file_path> --where <condition> --aggregate <column>=<operation>

Example

0

python main.py --file products.csv

Output

1

python main.py --file products.csv --where 'brand=xiaomi'

Output

2

python main.py --file products.csv --where 'price>100' --aggregate 'price=avg'

Output

3

python main.py --file products.csv --aggregate 'price=max'

Output

Test coverage

run

python -m pytest --cov=main

tesr_coverage

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages