some_list=[\'col1\',\'col2\'] df.withColumn(\'S1\',sum(df[col] for col in list(some_list))) and some_list\'s all columns are there in df getting Column is not iterab