numpy.delete删除列的方法


本文摘自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 print 按逗号或空格分隔的方法

Python编程快速上手适合初学者吗

详谈numpy中数组重塑、合并与拆分方法

利用Python3实现linux的脚本功能

介绍Python应用学习之qrcode生成二维码

Python中列表,数组,矩阵互相转换的方法

Python中if语句的详细介绍

Python的idle怎么用

Python编程如何判别线性

更多相关阅读请进入《Python》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...