I am bit new on pyspark. I have a spark dataframe with about 5 columns and 5 records. I have list of 5 records. Now I want to add these 5 static records from the list to the existing dataframe using withColumn. I did that, but its not working. Any suggestions are greatly appreciated.
Below is my sample:
dq_results=[]
for a in range(0,len(dq_results)):
dataFile_df=dataFile_df.withColumn("dq_results",lit(dq_results[a]))
print lit(dq_results[a])
thanks, Sreeram