I am tring to melt spark dataframe in scala using below code
val cols = df.columns val df_melt = df.selectExpr("stack({}, {})".format(len(cols), \',