This assignment and its reflection are due by Thursday, April 18 at 11:59 pm.
You should submit your finished
hw2_manual.py
,
hw2_pandas.py
,
and hw2_test.py
on Gradescope and the reflection on Google Forms
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
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. This contains some starter code.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.hw2_main.py
: A client program provided to call your functions.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 Gradescope, you should submit:
hw2_manual.py
hw2_pandas.py
hw2_test.py
Your submission will be evaluated on the following dimensions
flake8