ComeçarComece de graça

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.

Este exercício faz parte do curso

Reshaping Data with pandas

Ver curso

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# Define birds reading names and bird_facts lists into names and bird_facts columns 
birds = pd.DataFrame(____(____=____, ____=____))

# Print birds
print(birds)
Editar e executar o código