1 min readJun 8, 2020
Hi Karl,
Melt converts a wide dataframe (many columns) to a long dataframe (many rows). Different measures mean different columns. The dataframe before melt is applied has columns “danceability”, “energy”, “liveness”, “acousticness”, and “valence”. What melt does is to combine these columns under two columns. One is “variable” which contains columns names and the other one is “value” which contains the values in these columns.
It requires less and more simple code to create the graph after melt is applied. That’s why I showed both ways.
Thanks
Soner