This assignment and its reflection are due by Thursday, January 23 at 11:59 pm.
You should submit your finished
hw2_manual.py
,
hw2_pandas.py
,
and hw2_test.py
on Ed and the reflection on Google Forms
You may submit your assignment as many times as you want before the late cutoff (remember submitting after the due date will cost late days). Recall on Ed, you submit by pressing the "Mark" button. You are welcome to develop the assignment on Ed or develop locally and then upload to Ed before marking.
In this assignment, you will use the foundational Python skills you've been developing and apply them to analyze a small dataset. Many datasets you’ll be working with are structured as CSV or tabular representation - this assignment will be an introduction to reading, processing, and grouping rows and columns to calculate some interesting statistics. These skills will be very useful to have a strong foundation in when we work with much larger (and less complete) real-world datasets!
This assignment is broken in to two main parts, where each part mostly does the same computations in different ways. This is to give you the opportunity to compare/contrast different approaches to solving problems
After this homework, students will be able to:
flake8
, test suites, course resources).Here are some baseline expectations we expect you to meet:
Follow the course collaboration policies
If you are developing on Ed, all the files are there. If you are developing locally, you should download the starter code hw2.zip and open it as the project in Visual Studio Code. The files included are:
hw2_manual.py
: The file for you to put solutions to Part 0.hw2_pandas.py
: The file for you to put solutions to Part 1.hw2_test.py
: The file for you to put your tests for Part 0 and Part 1.cse163_utils.py
: A file where we will store utility functions for helping you write tests.run_hw2.py
: A client program provided to call your functions. This is just for your convenience.pokemon_box.csv
: A CSV file that stores information about Pokemon. This columns of this file are explained below.pokemon_test.csv
: A very small CSV file that stores information about Pokemon. This columns of this file are explained below.For this assignment, you will be working with a dataset of Pokemon that you have caught on your Pokemon journey so far. The file pokemon_box.csv
stores all the data about the captured Pokemon and has a format that looks like:
id | name | level | personality | type | weakness | atk | def | hp | stage |
---|---|---|---|---|---|---|---|---|---|
1 | Bulbasaur | 12 | Jolly | Grass | Fire | 45 | 50 | 112 | 1 |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
Note that because this is a CSV file, the file contents have these cells separated by commas.
Part 3a: Submit Assignment and Part 3b: Complete Reflection. On Ed, you should submit:
hw2_manual.py
hw2_pandas.py
hw2_test.py
Your submission will be evaluated on the following dimensions:
flake8
snake_case
), your code should not be overly redundant and should avoid unnecessary computations.