One - One Code All

Blog Content

python中数据类型转换astype,dtype

Python   2009-06-18 21:05:05

python中数据类型转换astype,dtype

1、查看数据类型 arr.dtype

>>> arr = np.array([1,2,3,4,5])

// 该命令查看数据类型
>>> arr.dtype
dtype('int64')

转换数据类型
>>> float_arr = arr.astype(np.float64)


上一篇:MySQL 添加列,修改列,删除列,alter table
下一篇:文本搜索工具grep正则表达式egrep多元复合“或|”表达

The minute you think of giving up, think of the reason why you held on so long.