Your team has been given a list of people who work at your company in quoted CSV format, with a requirement to produce a clean output of the CSV file using a Python application (See below).
Another member of your team has started work on a CSV parser to load the data from this file. You have been asked to finish the program by implementing the __parse_row
method in csvparser.py
.
Your only area of focus should be the implementation of the method.
CSV:
"Kacie","Holland","Principal Consultant",""
"Alishia","Burt","Consultant",""
"Yazmin","Rice","Senior Consultant",""
"Edmund","Ramsey","Consultant",""
"Oliver","Rooney","Associate Consultant",""
"Anisa","Hancock","Consultant","Has requested to join a different client"
...
Output:
Kacie - Holland - Principal Consultant -
Alishia - Burt - Consultant -
Yazmin - Rice - Senior Consultant -
Edmund - Ramsey - Consultant -
Oliver - Rooney - Associate Consultant -
Anisa - Hancock - Consultant - Has requested to join a different client
...
Note : Please do not fork the repository.
Three example .csvs have been included in the data
directory. Solve the problem for people-list.csv
first, then if time consider updating the code to ensure edge cases in people-list-comma.csv
, and then people-list-full.csv
are also handled.
- Python 3
- A clone of this repo
- A suitable dev environment, such as
VSCode
Create a new virtual environment:
# Windows
$ py -m venv venv
# MacOS/Unix
$ python3 -m venv venv
Activate the virtual environment:
# Windows
$ source venv/Scripts/activate
# MacOS/Unix
$ source venv/bin/activate
Run the app:
# Windows
$ py app.py
# MacOS/Unix
$ python3 app.py