4 ms·
This should do the trick. myframe['myfield'] = myframe['myfield'].dropna().map(float)
by stdbrouw 13y ago
This should do the trick.
myframe['myfield'] = myframe['myfield'].dropna().map(float)
- gjreda 13y agoAlternatively, I think you could also do: myframe.myfield.dropna().astype(float) I'd need to test that out though - type conversion in pandas/NumPy has always been a little confusing for me.