I have a dictionary `x = {'colA': 20, 'colB': 30}` and a pyspark df.

```
ID Value
1  ABC
1  BCD
1  AKB
2  CAB
2  AIK
3  KIB 

```

I want to create df1 using x as follows:

```
ID Value colA colB
1  ABC    20.0  30.0
1  BCD    20.0  30.0
1  AKB    20.0  30.0
2  CAB    20.0  30.0
...

```

Any idea how to do it Pyspark.
I know I can create a constant column like this,

```
df1 = df.withColumn('colA', lit(20.0))
df1 = df1.withColumn('colB', lit(30.0))

```

But not sure about the dynamic process to do it from dictionary