I have data in Row tuple format -
Row(Sentence=u'When, for the first time I realized the meaning of death.')
I want to convert it into String format like this -
(u'When, for the first time I realized the meaning of death.')
I tried like this (Suppose 'a' is having data in Row tupple)-
b = sc.parallelize(a)
b = b.map(lambda line: tuple([str(x) for x in line]))
print(b.take(4))
But I am getting result something like this -
[('W', 'h', 'e', 'n', ',', ' ', 'f', 'o', 'r', ' ', 't', 'h', 'e', ' ', 'f', 'i', 'r', 's', 't', ' ', 't', 'i', 'm', 'e', ' ', 'I', ' ', 'r', 'e', 'a', 'l', 'i', 'z', 'e', 'd', ' ', 't', 'h', 'e', ' ', 'm', 'e', 'a', 'n', 'i', 'n', 'g', ' ', 'o', 'f', ' ', 'd', 'e', 'a', 't', 'h', '.')]
Do anybody know what I am doing wrong here?