2, val df1=df. WithColumn (" uniform ", dfdata. Col (" IO "))
3, val df2=df. WithColumn (" normal ", randn (seed=27))
The second line is unusual, IO missing; The third line is normal, please explain
CodePudding user response:
Df. WithColumn (" uniform ", dfdata. Col (" IO "))Df withColumn behind of column can only be selected in df, can't choose from other DataFrame inside the column
CodePudding user response:
val df=sqlcontext range (0, 10)create DataFrame here only id a long field, the field you choose does not exist