I am trying to create testing data frame with one column with Int and one column with String type. With output similar to below. I reckon for Int we could use
data = spark.range(1, 5)
output = dataset.withColumnRenamed('id','myid')
How do we deal with that string column? Many thanks for your help!
Expected output:
id. ordernum
1 0032
2 0033
3 0034
4 0035
5 0036