Reshaping Data with 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.