The goal of this program is to get familiar with text processing in python. It takes a csv input file and standardizes the formats of the data fields. It then creates a objects for each entry in the input file and creates a dictionary for those objects. It then uses a pickle to dump and load the dictionary object and then displays the contents of the objects.
For input fields that are not in a correct format, the program outputs and error message and asks the user to re-enter the value.
Requirements:
Steps:
cdinto the same directory asmain.py- Enter the following command
python main.py [relative path to data file]
Example run: python main.py data/data.csv
In my opinion, python is suitable for text processing because of the vast library ecosystem, as well as the ability to slice strings. One weakness that python does have for text processing is the lack of types, which can cause some confusion for programmers, which is an issue that I imagine is much bigger when maintaining legacy code.
In this assignment, I learned:
- How to use sysarg in python
- Basics of object-oriented programming in python
- Basics of using regex in python
- How to use pickle files
- Basic file I/O in python
- Basics of how to write 'pythonic' code
- Get comfortable with python programming using PyCharm