numpy 进行数组拼接,分别在行和列上合并的实例
作者:accumulate_zhang 时间:2021-06-28 00:06:40
在进行数据分析的时候,会把把一些具有多个特征的样本数据进行拼接合并吗,放在一起分析,预测....
下面是用numpy中的函数进行数组的拼接。
(1)方法一。np.vstack() v 表示vertical 垂直,也就是竖着拼接 和np.hstack() h表示Horizontal 横向
(2)方法二,np.c_[array1,array2] c_表示colum列 np.r_[array1,array2] r_表示row行
来源:https://blog.csdn.net/accumulate_zhang/article/details/78452374
标签:numpy,数组,拼接,合并
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
keras回调函数的使用
2022-08-22 11:42:41
![](https://img.aspxhome.com/file/2023/1/92401_0s.png)
SQL Server 2005如何设置多字段做关键字
2009-01-08 15:57:00
Python中的sort()方法使用基础教程
2022-03-07 21:44:09
MySQL中随机生成固定长度字符串的方法
2010-12-08 16:25:00
微信小程序实现上传视频功能
2023-08-24 16:18:42
![](https://img.aspxhome.com/file/2023/4/56074_0s.jpg)
python中如何使用insert函数
2023-08-02 17:04:43
Flask实现图片的上传、下载及展示示例代码
2023-07-14 20:46:17
![](https://img.aspxhome.com/file/2023/2/63962_0s.png)
Python协程 yield与协程greenlet简单用法示例
2023-02-23 04:07:25
python实现在IDLE中输入多行的方法
2023-05-06 19:24:01
Python将多个excel表格合并为一个表格
2021-10-18 22:50:22
![](https://img.aspxhome.com/file/2023/8/81818_0s.jpg)
Python tkinter进度条控件(Progressbar)的使用
2023-08-01 20:24:21
![](https://img.aspxhome.com/file/2023/2/59652_0s.png)
python中Pexpect的工作流程实例讲解
2021-05-04 15:51:28
python保存数据到本地文件的方法
2023-10-01 20:59:53
Keras神经网络efficientnet模型搭建yolov3目标检测平台
2021-10-08 11:45:33
![](https://img.aspxhome.com/file/2023/2/95202_0s.png)
Python import导入上级目录文件的方法
2022-11-16 01:27:41
windows下cx_Freeze生成Python可执行程序的详细步骤
2022-12-06 05:27:57
![](https://img.aspxhome.com/file/2023/2/76092_0s.png)
JavaScript导出Excel实例详解
2023-09-06 15:51:27
ASP环境下邮件列表功能的实现
2007-10-03 14:25:00
windows7下调试ASP+ACCESS错误“未找到提供程序 该程序可能未正确安装”解决办法
2009-12-26 18:35:00
![](https://img.aspxhome.com/file/UploadPic/20101/11/20091119044705-94s.jpg)
python中opencv实现文字分割的实践
2022-08-02 20:42:48
![](https://img.aspxhome.com/file/2023/0/117310_0s.jpg)