Nov 16, 2026 | 532 words | 5 min read
11.3. Assignments#
In these assignments, you will:
Import CSV data into Python using the
csvmodule and pandasCalculate values from data three ways: a plain Python loop, vectorized NumPy array operations, and pandas DataFrame column arithmetic
Measure and compare how long each method takes to run using
time.perf_counter()Show that pandas is built on NumPy by comparing data types, converting DataFrame columns to NumPy arrays, and checking that results match
Explore how NumPy arrays and pandas DataFrames differ in sorting, labeled indexing, and handling missing data
Decide when pandas or NumPy is the right tool for a task View, inspect, and manipulate pandas DataFrames (display rows, column names, and dimensions; rename columns; add calculated columns)
Calculate descriptive statistics (mean, median, standard deviation, minimum, and maximum)
Create and format professional engineering plots with matplotlib, including titles, axis labels and units, axis limits, colors, font sizes, grids, and tick marks
Clean data by finding and removing invalid data points without hardcoding values
Filter a DataFrame with logical conditions to create a subset of the data
Save plots as image files and write filtered data to a new CSV file
Interpret data trends and communicate findings clearly through visualizations
Apply modular programming and the course Python Style Guide, including detailed comments, to organize and document your code
Test your programs against sample output to confirm they behave correctly
Learning Objectives
- PR01:
Programming Standards - Develop code that follows established programming standards and conventions.
- PR02:
Data Storage - Store and access data appropriately.
- PR03:
Calculations - Perform algebraic, array, relational, and logical operations using a programming language. Effectively utilize built-in functions.
- PC05:
Meeting Assignment Expectations - Fully complete all parts of each assignment according to provided instructions.
Assignments for this Module
Save Deliverables: Ensure all required assignment files are saved and named exactly as specified in the assignment instructions. If a template file name contains the word
template, replace only that word with your Purdue username. When a task lists more than one deliverable, such as a workbook and a report, submit each deliverable to its own matching Gradescope assignment instead of combining them into one upload.Navigate to Gradescope: Log in to Gradescope. From your Dashboard, open the assignment.
Upload your work: Select the Upload submission method. Drag and drop all required files (or a compressed
.zipfolder) into Gradescope, and select Upload.Confirm Submission: When your upload is successful, you will see a confirmation message on your screen and receive an automated email receipt.
Add Team Members (if applicable): If this is a team assignment, add all team members to the submission. Each teammate should confirm they can see the submission in their own Gradescope account. For help, visit Gradescope’s documentation on adding team members.
Review Autograder Results: Wait a few minutes for the autograder to evaluate the relevant files. Scroll down to view any failed test cases. If you need assistance interpreting the output or errors, ask your teaching team.
Resubmit if Necessary: You can edit your files and select Resubmit as many times as you need before the assignment deadline. Only your final, active submission is graded. (Note: If you need to resubmit, you must upload all required files for the assignment again).
For a detailed walkthrough, review the official Gradescope Submission Guide.