I have an large array of more than 40000 elements
a = ['15', '12', '', 18909, ...., '8989', '', '90789', '8']
I'm looking for a simply way to replace the empty '' values to '0' so that I can manipulate the data in the array using Numpy.
I would then convert the elements in my array into integers using
a = map(int, a)
so that I could find the mean of the array in numpy
a_mean = np.mean(a)
My issue is that I cannot convert to integers in an array with missing numbers to get a mean.