1、numpy库
(1)、shape用法
group = array([[1.0,1.1],[1.0,1.0],[0,0],[0,0.1]])
print(group.shape) 结果:(4,2)
print(group.shape[0]) 结果:4
print(group.shape[1]) 结果:2
(2)、tile用法
地址:https://www.cnblogs.com/zibu1234/p/4210521.html
(3)、sum用法
地址:https://blog.csdn.net/qq_40130759/article/details/79524733
(4)、argsort用法
地址:https://www.cnblogs.com/yyxf1413/p/6253995.html
(5)、sorted用法
eg:
testDic = {'A':2,'B':1} ss = sorted(testDic.items(),key=operator.itemgetter(1)) print(ss)
结果:[('B', 1), ('A', 2)]
key = operator.itemgetter(indexValue)
indexValue:0 代表以key来从小到大排序
indexValue:1 代表以value来从小到大排序
(6)、zeors用法
地址:https://blog.csdn.net/u012005313/article/details/49182211/