Reshaping Data with melt function

https://app.dataquest.io/m/345/transforming-data-with-pandas/7/reshaping-data-with-the-melt-function

How was the df happy_two created. it was used in pd.melt() function

1 Like

hi @oriji.sandra

Just take the first two rows from the happiness2015 dataframe. You may use the iloc method to do this or directly slice the dataframe for the first the two rows.

2 Likes