本文摘自php中文网,作者php中世界最好的语言,侵删。
这次给大家带来numpy.delete删除列的方法,numpy.delete删除列的注意事项有哪些,下面就是实战案例,一起来看一下。基础介绍:
1 2 3 4 5 6 7 8 9 10 11 12 13 | numpy. delete
numpy. delete (arr, obj, axis=None)[source]
Return a new array with sub-arrays along an axis deleted. For a one dimensional array , this returns those entries not returned by arr[obj].
Parameters:
arr : array_like
Input array .
obj : slice, int or array of ints
Indicate which sub-arrays to remove.
axis : int, optional
The axis along which to delete the subarray defined by obj. If axis is None, obj is applied to the flattened array .
Returns:
out : ndarray
A copy of arr with the elements specified by obj removed. Note that delete does not occur in-place. If axis is None, out is a flattened array .
|
示例:
1.删除一列
阅读剩余部分
相关阅读 >>
Python注释怎么加
关于Python闭包机制的深入理解
总结用Python 操作 pdf 的几种方法
Python中有关数据结构如何链表的详解
Python实现单词反转效果
Python是面向对象还是面向过程?
Python默认安装路径在哪
Python怎么合并两个列表
编写专属的Python模块
Python类变量和实例变量的区别
更多相关阅读请进入《Python》频道 >>
人民邮电出版社
python入门书籍,非常畅销,超高好评,python官方公认好书。
转载请注明出处:木庄网络博客 » numpy.delete删除列的方法