Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

spark dataframe add column with function

val myDF = sqlContext.parquetFile("hdfs:/to/my/file.parquet")

myDF.withColumn("Code", coder(myDF("Amt")))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #spark #dataframe #add #column #function
ADD COMMENT
Topic
Name
1+5 =