上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 28 下一页
摘要: label1=['apple','orange','pear','banana'] label2=['one','two','three','four'] df=pd.DataFrame(np.arange(16).reshape(4,-1),index=label1,columns=label2) 阅读全文
posted @ 2020-04-23 23:34 limalove 阅读(450) 评论(0) 推荐(0)
摘要: dict的优势和限制: 1,键必须是可散列的; 2,字典在内存上的开销巨大; 3,键查询很快; dict的实现是典型的空间换时间:字典类型有着巨大的内存开销,但它们提供了无视数据量大小的快速访问——只要字典能被装在内存里。 注意事项: 1,不要对字典同时进行迭代和修改; 如果想扫描并修改一个字典,最 阅读全文
posted @ 2020-04-21 00:11 limalove 阅读(3002) 评论(0) 推荐(1)
摘要: #对于二维的数组,数组形状相同时才可以判断,如一个(2,3)的数组和一个(2,2)的数组判断时会报错 a=np.array([[1,2,3],[4,5,6]]) b=np.array([[1,2,5],[4,4,5]]) c=(a==b) d=c.any() #只要有一个TRUE,就返回TRUE e 阅读全文
posted @ 2020-04-09 21:58 limalove 阅读(13073) 评论(0) 推荐(0)
摘要: #一维数组转化成二维的方法: np.random.seed(101) arr=np.random.randint(1,4,size=6) print("\n原数组:\n",arr) print("\n如何把一维数组转换成二维的:") print("arr[:,None]:\n",arr[:,None 阅读全文
posted @ 2020-04-09 18:57 limalove 阅读(3459) 评论(0) 推荐(0)
摘要: 1,VisibleDeprecationWarning: Reading unicode strings without specifying the encoding argument is deprecated. Set the encoding, use None for the system 阅读全文
posted @ 2020-04-07 22:20 limalove 阅读(796) 评论(0) 推荐(0)
摘要: numpy.intersect1d(ar1, ar2, assume_unique=False, return_indices=False)[source] Find the intersection of two arrays. 返回两个数组中共同的元素 Return the sorted, un 阅读全文
posted @ 2020-04-07 20:20 limalove 阅读(11445) 评论(0) 推荐(1)
摘要: 伪随机数,伪:假的,即假的随机数,说明并不是随机的 总结 1.计算机的伪随机数是由随机种子根据一定的计算方法计算出来的数值。所以,只要计算方法一定,随机种子一定,那么产生的随机数就是固定的。 2.只要用户或第三方不设置随机种子,那么在默认情况下随机种子来自系统时钟。 当seed相同时,返回的随机数不 阅读全文
posted @ 2020-04-05 21:05 limalove 阅读(1798) 评论(0) 推荐(0)
摘要: 官方文档:https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.tolist.html?highlight=numpy%20tolist numpy.ndarray.tolist method ndarray.tolis 阅读全文
posted @ 2020-04-03 23:23 limalove 阅读(2280) 评论(0) 推荐(0)
摘要: 转载自: http://www.360doc.com/content/19/0611/06/35302061_841664233.shtml 原理解析: 判断当前单元格的身份证号码是否重复出现 公式: =IF(COUNTIF($A$2:A5,A5&"*")>1,"重复出现","") 对于身份证号码以 阅读全文
posted @ 2020-03-21 20:43 limalove 阅读(2244) 评论(0) 推荐(0)
摘要: 1,斜线表头 单元格样式 - 边框中可以添加对角线,alt+enter在单元格内换行 2,隐藏单元格中的数字0 a, 选项 - 高级 - “在具有零值的单元格中显示零” (打开高级后,往下滑动滚动条,在 “ 此工作表的显示选项 ” 这一部分中) 3,Ctrl+D, Ctrl+R 快速往下填充,往右填 阅读全文
posted @ 2020-03-20 23:49 limalove 阅读(276) 评论(0) 推荐(0)
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 28 下一页