Another way:
// Generate a simple dataset containing five values and convert int to string typeval df = spark.range(5).select( col("id").cast("string")).withColumnRenamed("id","value")
Another way:
// Generate a simple dataset containing five values and convert int to string typeval df = spark.range(5).select( col("id").cast("string")).withColumnRenamed("id","value")