Challenge
No
This data is modified from a Kaggle data set.
The data set has records with three fields. Here is part of the CSV file:
- "trainer","number_pokemon","total_EXP"
- "Youngster Tristan",1,60
- "Youngster Logan",1,65
- "Lass Natalie",1,62
- "Youngster Michael",2,150
- "Camper",1,61
Fields:
- Trainer name. Validation rule: cannot be MT (empty).
- Number of Pokémon. Validation rule: an integer from 0 to 6.
- EXP. Validation rule: an integer from 0 to 50,000.
Write a program to validate the data, and show means and counts comparing trainers with few Pokémon (0 to 3) to those with many (4 to 6). Here is my output:
- Pokemon Trainers Exp Points
- ======= ======== === ======
- Valid records: 919
- Invalid records: 8
- Total records: 927
- Low pokemon count (0-2)
- --- ------- ----- -----
- Records: 697
- Mean: 1653.22
- High pokemon count (3-6)
- --- ------- ----- -----
- Records: 222
- Mean: 4097.98
Use line spacing and underlining as shown.
Add docstrings to every function.
Round means to two decimal places.
Upload your solution to this website as usual, not to Moodle.
The usual programming standards apply.
If you were logged in as a student, you could submit a solution to this exercise.