I want to convert all the string value in Pandas DataFrame into float, and I can define a short function to do this, but it's not a Pythonic way to do that. My DataFrame looks like this:
>>> df = pd.DataFrame(np.array([['1', '2', '3'], ['4', '5', '6']]))
>>> df
0 1 2
0 1 2 3
1 4 5 6
>>> df.dtypes
0 object
1 object
2 object
dtype: object
>>> type(df[0][0])
<type 'str'>
I just wonder whether are there some built-in functions of Pandas DataFrame to convert all the string value to float. If you know the built-in function on the Pandas doc, please post the link.