Pandas Application Question

Pandas Application Question#

Q3A: Load a structured data file as a DataFrame. You’re welcome to use your own data file, the file from Thursday’s in-class work, or the sample-data.csv file provided with this lab (GitHub, Google Drive).

  • Click here for more background on the sample data.

Q3B: Using the DataFrame you created for Q3A, write code that accomplishes the following tasks. Your answer for these items should include a Python program + comments that document process and explain your code.

  • Shows the first five rows

  • Shows the last five rows

  • Checks the data types for each column

  • Returns a technical summary for the DataFrame

Q3C: Using the DataFrame you created for Q7A, write code that executes AT LEAST FOUR (4) of the following tasks. Your answer for these items should include a Python program + comments that document process and explain your code.

  • Sorts a column by ascending values

  • Sorts a column by descending values

  • Selects a specific column in the DataFrame

  • Creates a new DataFrame with select columns from existing DataFrame

  • Uses a comparison operator to filter rows in the DataFrame

  • Uses an isin statement to filter rows in the DataFrame

  • Selects specific rows and columns