Skip to content

CSV Processing Tool is a Python CLI utility for filtering and aggregating data from CSV files. It allows you to quickly process large amounts of tabular information using the command line, without the need to use Excel or databases.

Notifications You must be signed in to change notification settings

averageencoreenjoer/processing-csv

Repository files navigation

️Использование

Фильтрация

python main.py --file tests/test_data/products.csv --where "price>500"
Скриншот вывода

Фильтрация


Агрегация

python main.py --file tests/test_data/products.csv --aggregate "rating=avg"
Скриншот вывода

Агрегация


Комбинированный запрос

python main.py --file tests/test_data/products.csv --where "brand=apple" --aggregate "price=min"
Скриншот вывода

Комбинированный запрос


Сортировка

python main.py --file tests/test_data/products.csv --order-by "price=desc"
Скриншот вывода

Сортировка 1 часть Сортировка 2 часть


Фильтрация + сортировка

python main.py --file tests/test_data/products.csv --where "brand=samsung" --order-by "rating=asc"
Скриншот вывода

Фильтрация + сортировка


Pytest

pytest tests/ --cov=src --cov-report=term-missing    
Скриншот вывода

pytest 1 часть pytest 2 часть


Docker

docker build -t processing-csv .
docker-compose up
Скриншот вывода

docker-compose up docker-compose.yml


Аргументы

Аргумент Описание
--file Путь к CSV-файлу
--aggregate Агрегация данных по колонке (avg, min, max, sum)
--where Фильтрация по значению в колонке (key=value)

About

CSV Processing Tool is a Python CLI utility for filtering and aggregating data from CSV files. It allows you to quickly process large amounts of tabular information using the command line, without the need to use Excel or databases.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published