I have a dataframe that I pulled in from an API. After some cleaning it looks something like this:
Title Year Rating Title Year Rating Title Year Rating
Movie 1 1997 6.7 Movie 2 1987 8.2 Movie 3 2009 7.1
The column headers repeat, and in this case a single row contains 3 separate entries.
How would I reshape this so that I end up with 3 columns (Title, Year, Rating) and 3 rows (Movie 1, Movie 2, Movie 3)?
What's the simplest way of doing this?