Hi ,

How we can create multiple columns iteratively i mean how you can create
empty columns inside loop because :
  with
 for i in listl :
    df = df.withcolumn(i,F.lit(0))

we get stackoverflow
how we can do that inside  list of  columns like that

df.select([F.col(i).lit(0)  for i in df.columns ])

i know the last line it not correct but i try to show you what kind of
result i expect .

Thx for advance
.

Reply via email to