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!
Diese Übung ist Teil des Kurses
Reshaping Data with pandas
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Melt the rating and rating_count using title, authors and publisher as identifiers
books_ratings = books_gothic.____(____=____,
____=____)
# Print books_ratings
print(books_ratings)