I'm new to pyspark, and have been trying to figure this out for hours.
Currently, my RDD looks like this:
[['74', '85', '123'], ['73', '84', '122'], ['72', '83', '121'], ['70', '81', '119'], ['70', '81', '119'], ['69', '80', '118'], ['70', '81', '119'], ['70', '81', '119'], ['76', '87', '125'], ['76', '87', '125']]
I want it to look like this (where all the entries are integers):
[[74, 85, 123], [73, 84, 122], [72, 83, 121], [70, 81, 119], [70, 81, 119], [69, 80, 118], [70, 81, 119], [70, 81, 119], [76, 87, 125], [76, 87, 125]]
The closest I've gotten was by using flatMap to turn in into a 1D array and then converting the entries into integers. However, I am hoping to process the integers three at a time (calculate the sum and average of the entries 3 at a time), and I figured keeping it in a 2-d array would be the easiest way to do that. I also tried list comprehensions but they don't seem to work since it isn't a list. Any help would be greatly appreciated!