I am using the below:
from pyspark.sql.functions import * from pyspark.sql.types import * import json def test(test1,test2): d = [{\'amount\': a, \'disco