to_numeric1 python : pd.to_numeric() VS astype(np.float64) import pandas as pd import numpy as np df = pd.DataFrame(np.random.randint(10**5, 10**7, (5,3)), columns=list('abc'), dtype=np.int64) df a b c 0 2368596 282593 7649457 1 6486779 5348256 790672 2 8468404 4682970 2904873 3 2271514 2908642 9272301 4 7811256 3652968 6715015 df.dtypes a int64 b int64 c int64 dtype: object df['a'] = df['a'].astype(float) df.dtypes a float64 b int64 c int64 dtype: obje.. 2019. 11. 27. 이전 1 다음