2017-05-04 38 views

回答

-1

一個新列可以添加像下面

df.withColumn("status",df.online) 

這可以強制轉換爲字符串類型明確如下

df.withColumn("status",df.online.cast("String"))