GH avatar Bite 124. Marvel data analysis

marvel spiderman coffee mugThis 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 namedtuples:

[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!

go back Advanced level
Bitecoin 4X

Will you be Pythonista #56 to crack this Bite?
Resolution time: ~56 min. (avg. submissions of 5-240 min.)
Pythonistas rate this Bite 3.75 on a 1-10 difficulty scale.
» You can do it! 😌

Buy Now Login and get coding
We use Python 3.7