Marvel data analysis
Level: Advanced (score: 4)
This is a simplified version of our Marvel Data Analysis we held at the Alicante PyChallengeDay.
Complete most_popular_characters
, max_and_min_years_new_characters
and percentage_female
functions below, following the instructions in the docstrings.
We already loaded the Marvel csv
data into a list
of Character namedtuple
s:
[Character(pid='1678', name='Spider-Man', sid='Secret Identity', align='Good Characters', sex='Male Characters', appearances='4043', year='1962'), Character(pid='7139', name='Captain America', sid='Public Identity', align='Good Characters', sex='Male Characters', appearances='3360', year='1941'), Character(pid='64786', name='Wolverine', sid='Public Identity', align='Neutral Characters', sex='Male Characters', appearances='3061', year='1974'), ... ]
Note that if a character appears in multiple eras / universes they should be treated as separate unique characters. For example:
Susan Storm (Earth-616) Susan Storm (Heroes Reborn) (Earth-616) Susan Storm (Onslaught Reborn) (Earth-616) Susan Storm (Retro, Skrull) (Earth-616)
are 4 characters, not 1!
Ready to get some interesting facts from this Marvel data set? Enjoy and learn more Python!