本文摘自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读写excel文档
什么是Python字典?如何创建以及使用Python字典?
介绍Python爬取网页
Python中╲t是什么
Python中的迭代器是什么?迭代器的作用是什么?
零基础学Python可以干什么
Python中字符串如何比较大小
vs可以写Python吗
如何使用django进行urls反向解析?
Python语言是非开源语言吗
更多相关阅读请进入《Python》频道 >>
人民邮电出版社
python入门书籍,非常畅销,超高好评,python官方公认好书。
转载请注明出处:木庄网络博客 » numpy.delete删除列的方法