I have a huge file (a.txt) as the following in which there is a special mark in file that divides the data into group
a1
a2
$$$$$$$$
a1
c1
b1
c2
$$$$$$$$
d1
d2
$$$$$$$$
...
I want to use python code like:
line = sc.textFile("a.txt")
line1 = line.filter() or line.filter.map()...
...
to divide the group items into several groups like the following: (a1,a2), (a1, c1, b1,c2), (d1, d2)....but could not figure out how to do it, can somebody help?