pandas2 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. Python : Pandas Visualization pandas의 plot은 내부적으로 matplotlib.pyplot을 이용한다. import numpy as np import pandas as pd import matplotlib.pyplot as plt df1 = pd.DataFrame(np.random.randn(100, 3), index=pd.date_range('1/1/2019', periods=100), columns=['A', 'B', 'C']).cumsum() df1 A B C 2019-01-01 -0.896370 -1.962732 1.584821 2019-01-02 -0.248402 -3.101740 0.370419 2019-01-03 0.622560 -3.979711 1.666569 2019-01-04 1.239019 -3.443114.. 2019. 11. 25. 이전 1 다음