I have a csv file which has records are in multiline like this
id1,id2,id3,id4,id5,id6,id7
1,2,3,4,5,6,7
1,2,3,4
,5,6,
7
1,2
3,4
,5,6,
7
I want to change the file like below -
id1,id2,id3,id4,id5,id6,id7
1,2,3,4,5,6,7
1,2,3,4,5,6,7
1,2,3,4,5,6,7
I know pyspark can read such file with multiline :True option but I want to convert this file to single line rows which is the business use case. How can I do it. Technologies to be used are either Pyspark or Python (Pandas). Thanks in advance