ComeçarComece de graça

How is Frankenstein, Dorian Gray?

You are satisfied with the way you reshaped the books_gothic DataFrame, however, you would like to finish your work by naming the newly-created columns. This will help you clarify what the variables and values are.

You remember that .melt() allows you to do that. In order to achieve your goal, you will reshape your DataFrame in three steps.

The same books_gothic dataset you used before is available for you. It contains data about the title, author, number_pages, rating, rating_count, and publisher of each book. Make sure to examine it in the console!

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.

# Melt the rating and rating_count using title, authors and publisher as identifiers
books_ratings = books_gothic.____(____=____, 
                                  ____=____)

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