pandas as_matrix()

df = pd.DataFrame(np.arange(12).reshape(3, 4))

df
Out[10]: 
   0  1   2   3
0  0  1   2   3
1  4  5   6   7
2  8  9  10  11

df.as_matrix()
Out[11]: 
array([[ 0,  1,  2,  3],
       [ 4,  5,  6,  7],
       [ 8,  9, 10, 11]])

 

文章来自:https://www.cnblogs.com/key221/p/9394051.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3