In this exercise, redo Exercise 1, following the example for planning and building your code in Planning-code-prime-numbers-example.ipynb, and create a notebook that defines and uses a series of functions to clean up items.csv.
Step 1: Load items.csv into Excel and inspect it closely. Make note of all the different kinds of problems you see -- including which of the fields we are interested in are sometimes missing, what kinds of extraneous characters you find, and so forth. Scan through the whole file to make this assessment -- not just the first few rows as we did in Exercise 1.
Step 2: Write a plan for cleaning this up, in your notebook, using headings and markdown cells.
Step 3. Write pseudo-code for the functions to implement.
Step 4. Write the code, in incremental steps, with comments and docstrings, and show that you have tested each function.
Step 5. Run the code over the entire file -- not just the first few rows. Rather than printing over 2,000 lines, print out a set of counters for how many times you find each of the problems you see in the file (like missing values on variable X, or extraneous character Y), and print only the first 50 rows of cleaned data.
The objective of this exercise is to practice planning and writing code that uses conditionals, booleans, different data types and their methods, and organizes these into reusable functions in a well-organized and documented notebook.