Spark Scala - How to explode a column into multiple rows in spark scala

Df.select(col("A"),explode(col("devices"))

Using this I am able to find the required answer