The seventh homework assignment is to create a Python program that reads in data from the CSV file you used
in homework 6 and creates a Pandas DataFrame and then cleans and prepares the data in the DataFrame. Your program should include the following:
Comments to explain what is happening at each step as well as one in the beginning of your code that has your name and the date the code was created and/or last modified. Also have an overall comment at the beginning of your program that describes what the program does.
The creation of a DataFrame that stores some (or all) of the data in your dataset.
Use of the .columns property to report the names of the columns in the DataFrame. Next reduce the number of columns in your DataFrame to five specific columns, with at least one of them containing categorical data.
Use of the .count() method to report the number of rows in the DataFrame. Next remove some rows from the DataFrame according to some criteria that you feel is appropriate (e.g., remove rows that have the value 0 in a given column, or values greater than a specified amount, etc.). Then, report the number of rows in the DataFrame after you removed the rows.
Use the .replace() method to change some values in your DataFrame as you deem appropriate. Examples could be updating a salary amount using a specific raise percentage, or replacing missing values with the value of 0, etc.
Use of the .query() method to report the rows in the DataFrame that satisfy some user-specified criteria. For this, prompt the user to enter in some information and report the results that correspond to their entry.
Use the .get_dummies() method to create some dummy(indicator) variables for one of the columns in your DataFrame that has categorical values and save those columns with your DataFrame.
Use of the .head() method to report the first 4 rows in the DataFrame
Use of the .tail() method to report the last 7 rows in the DataFrame