摘要: # coding=utf-8 import numpy as np ''' 填充nan的数据,为该列的平均值 ''' def fill_ndarray(t1): for i in range(t1.shape[1]): temp_col = t1[:,i] #取每一列 print(temp_col) nan_num =np.count_... 阅读全文
posted @ 2019-05-07 18:00 小白啊小白,Fighting 阅读(2629) 评论(0) 推荐(0) 编辑
摘要: 注意点: 阅读全文
posted @ 2019-05-07 17:58 小白啊小白,Fighting 阅读(527) 评论(0) 推荐(0) 编辑
摘要: a = np.array([[11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25], [26, 27, 28 ,29, 30], [31, 32, 33, 34, 35]]) print(type(a)) # >>><clas 阅读全文
posted @ 2019-05-07 17:56 小白啊小白,Fighting 阅读(437) 评论(0) 推荐(0) 编辑
摘要: # coding=utf-8 import numpy as np import random ############一维数组创建############# #方式一 t1 = np.array([1,2,3],dtype=float) print(t1,t1.dtype,t1.shape) #方式二 t2 = np.array(range(5),dtype=float) print(t... 阅读全文
posted @ 2019-05-07 17:55 小白啊小白,Fighting 阅读(507) 评论(0) 推荐(0) 编辑