We are looping over the CSV file process the CSV and store the result into string variable .
string is in below format
Loop iteration 1 -- string1--> CS,20,20021988,Ind
Loop iteration 2 -- string2--> FQ,20,,Aus
loop Iteration 3 -- string3 -->SR,,,US
If you see number of fields within string are not consistent , Is there any way to store this results into pyspark dataframe during each loop . I e. append each record into dataframe during each iteration
looking final dataframe Result like below
5