Skip to content

Latest commit

 

History

History
9 lines (7 loc) · 590 Bytes

README.md

File metadata and controls

9 lines (7 loc) · 590 Bytes

HW2: Using functions

Create a python module (a file with extension ‘.py’) with the following functions:

  1. (4 points) Find an on-line data source (e.g., from data.gov). Write python codes that read the on-line file and create a data frame that has at least 3 columns.

  2. (3 points) Create the function test_create_dataframe that takes a pandas DataFrame as input and returns True if the following conditions hold:

    • The DataFrame contains only the columns that you specified in #1.
    • The columns contain the correct data type
    • There are at least 10 rows in the DataFrame.