My code is:
sample1 = df_pat_jour_status_other_occurances.rdd.map(lambda x: (x.lh_pat_id, x.src_key, x.Journey_Status)).toDF() type(sample1)