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.
This exercise is part of the course
Reshaping Data with pandas
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# 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)