What’s the command to replace a field value with 0 when its empty string in a rdd and the field deli meter is “,”?
Suppose the data looks like
3070811,1963,1096,“US”,“CA”,1,
3022811,1963,1096,“US”,“CA”,1,56
3033811,1963,1096,“US”,“CA”,1,23
I want to see the output as
Array(Array(3070811,1963,109G, 0, “US”, “CA”, 0,1, 0) ,Array(3022811,1963,1096, 0, “US”, “CA”, 0,1, 56) ,Array(3033811,1963,1096, 0, “US”, “CA”, 0,1, 23) )