This is a pure python solution and it creates list.
With simple python operations, you can display an internal list using float. This will convert all string elements to float and make it the zero indexed element of your list.
a = [['-0.99' , '0.56' , '0.56' , '0.56', '-2.02' , '-0.96']]
a[0] = map(float, a[0])
print a
[[-0.99, 0.56, 0.56, 0.56, -2.02, -0.96]]
Update: try to run
a = [['-0.99' , '0.56' , '0.56' , '0.56', '-2.02' , '-0.96', '', 'nan']]
for _position, _value in enumerate(a[0]):
try:
_new_value = float(_value)
except ValueError:
_new_value = 0.0
a[0][_position] = _new_value
[[-0.99, 0.56, 0.56, 0.56, -2.02, -0.96, 0.0, nan]]
float, , 0.0