摘要: 描述 Python的 sorted() 函数 用于给dict(字典)数据结构排序,按dict中 value的大小排序,大小优先级可以指定。需在文件之前导入operator模块 语法 sorted()方法语法: 参数 dictname -- 被排序的字典变量名 key=operator.itemget 阅读全文
posted @ 2017-06-30 18:46 Apollo_zhanghongbo 阅读(463) 评论(0) 推荐(0) 编辑
摘要: import一个路径解析的.py模块 参考资料: http://blog.csdn.net/wangjian1204/article/details/67633614 阅读全文
posted @ 2017-06-30 17:26 Apollo_zhanghongbo 阅读(13179) 评论(0) 推荐(0) 编辑
摘要: 描述 Numpy 的 tile() 用于叠加(复制)指定的数据结构。 语法 tile()方法语法: 参数 dataStructure -- 被叠加的数据结构 shape --以什么shape叠加 返回值 返回叠加得到的数据结构,一般是ndarray。 实例 以下实例展示了tile()函数的使用方法: 阅读全文
posted @ 2017-06-30 15:07 Apollo_zhanghongbo 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 功能:求numpy数据结构的size 描述 由Numpy中的ndarray变量调用,求shape 语法 shape()方法语法: 参数 ndarrayname -- ndarray变量 返回值 返回shape,一般是tuple变量。 实例 以下实例展示了shape()函数的使用方法: 阅读全文
posted @ 2017-06-30 14:54 Apollo_zhanghongbo 阅读(488) 评论(0) 推荐(0) 编辑
摘要: 1.ndarray.max([int axis]) 函数功能:求ndarray中指定维度的最大值,默认求所有值的最大值。 axis=0:求各column的最大值 axis=1:求各row的最大值 阅读全文
posted @ 2017-06-30 14:52 Apollo_zhanghongbo 阅读(9654) 评论(0) 推荐(0) 编辑
摘要: Python strip()方法 Python 字符串 描述 Python strip() 方法用于移除字符串头尾指定的字符(默认为空格)。 语法 strip()方法语法: 参数 chars -- 移除字符串头尾指定的字符。 返回值 返回移除字符串头尾指定的字符生成的新字符串。 实例 以下实例展示了 阅读全文
posted @ 2017-06-30 10:43 Apollo_zhanghongbo 阅读(482) 评论(0) 推荐(0) 编辑