I have below code in Python but I need to convert this to pyspark,
qm1['c1'] = [x[0] in x[1] for x in zip(qm1['id'], qm1['question'])]
qm1['c1'] = qm1['c1'].astype(str)
qm1a = qm1[(qm1.c1 == 'True')]
The output of this python code is
question | key | id | c1 |
---|---|---|---|
Women | 0 | omen | True |
machine | 0 | mac | True |
Could someone please help me out on the same as I am a beginner in Python?