The golden age
In this exercise, you'll continue working on the book project. Now, you'll analyze books from the Golden Age.
Upon inspection, you discovered that the dataset golden_age needs reshaping. You noticed that some column names start with the same prefix (stub names) and identified other columns to use as unique IDs.
For that reason, you'll reshape your DataFrame in several ways. Use the function wide_to_long() along with each instruction.
The golden_age dataset is available for you. It contains the title, authors, and data about the universal identifier ISBN and prefix for countries of each book.
Deze oefening maakt deel uit van de cursus
Reshaping Data with pandas
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
# Reshape wide to long using title as index and version as new name, and extracting isbn prefix
isbn_long = pd.____(____,
stubnames=____,
i=____,
j=____)
# Print isbn_long
print(isbn_long)