df=spark.sql("select key, name, subjects from table")
df in from above select statement :
key name subjects
12 x,y,z 1,2,3
20 a,b 8,7
df out :
12 x 1
12 y 2
12 z 3
20 a 8
20 b 7
tried converting to list , explode. Still throwing error. pls help the efficient way to achieve this ?