This project provides a set of tools for processing CSV and TSV files, including converting TSV files to CSV format and removing rows based on regex patterns.
- TSV to CSV Conversion: Convert TSV files to CSV format.
- Row Filtering by Regex: Remove rows from a CSV file that match a specific pattern and do not match another pattern.
- Python 3.8+
- pip
-
Clone the repository:
git clone https://github.com/yourusername/syte-test-assignment.git cd syte-test-assignment -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate -
Install the required dependencies:
pip install -r requirements.txt
To convert a TSV file to CSV format, use the convert_tsv_to_csv function from the converter module.
python src/converter.py --infile python_home_task_file.tsvpython src/csv_task.py --infile python_home_task_file.csv --out python_home_task_file_with_price.csvpython src/regex_task.py --infile python_home_task_file.csv --out python_home_task_file_regex.csvPYTHONPATH="./src" pytest -s -v ./tests