1. Learn
  2. /
  3. Courses
  4. /
  5. Reshaping Data with pandas

Exercise

Un-nesting birds

Finally, your job for the day is done, but your colleague asked you a last minute favor. A client has provided data about birds he wants to classify.

You examine the data and realize that it's in a bad format - the list of birds is in one file, and the characteristics of the birds are in another.

You manage to read the bird names into a list called names. You read the bird facts into another list called bird_facts, but this list contains dictionaries in string format.

To have a usable DataFrame, you will need to perform several operations.

Both the names and bird_facts lists are available in your session. Make sure to examine it in the console! The json module is pre-loaded.

Instructions 1/4

undefined XP
    1
    2
    3
    4
  • Convert the names and bird_facts lists into columns of a new DataFrame called birds, using the same names.