Create a python module (a file with extension ‘.py’) with the following functions:
- (3 points) Last week you write python codes that read an on-line file and create a data frame that has at least 3 columns. In this homework, extend these codes to generate the following exceptions:
- Check if the file exists. If it doesn't print a meaningful error message.
- Check that the resulting dataframe has a minimum number of rows (specified by an optional argument). If it doesn't generate an exception.
-
(3 points) Extend test_create_dataframe.py from HW2 to check that the correct exceptions are generated when they should be and are not generated when they should not be.
-
(1 point) Create a new notebook that calls the python module created in #1.