0

I have already gone through the above answers and posted my concerns in comments, so please do not close this before answering my comments.

I went through some of the answers available but none was working

Sample dataset:

enter image description here

Expected result:

enter image description here

  • Sorry If I am being naive here, I am very new to PY spark and I tried replicating the first answer given on this query: https://stackoverflow.com/questions/41670103/pandas-melt-function-in-apache-spark# But I have following doubts in above queries: 1. not able to import this 'from typing import Iterable ' error: No module named typing 2. where I have to give columns to be retained and columns to be melted down? – GAURAV JINDAL Jun 19 '17 at 10:42
  • Also, I am getting following error for 'df: DataFrame' SyntaxError: invalid syntax if I run the definition part of the code. – GAURAV JINDAL Jun 19 '17 at 10:49

0 Answers0