上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 67 下一页
摘要: DataFrame 二维,Series容器 一、创建DataFrame # 方法一 pd.DataFrame(data=None, index=None, columns=None) # data: array-like, 数据 # index: array-like, 行索引 axis=0 # c 阅读全文
posted @ 2019-12-02 15:13 市丸银 阅读(1761) 评论(0) 推荐(0) 编辑
摘要: 一维,带标签数组 一、创建Series 1、方法一 pd.Series(data=None, index=None) # data和index值的数据类型: array-like # data是Series的值,index是Series的标签 2、方法二 pd.Series({"name": "to 阅读全文
posted @ 2019-12-02 12:03 市丸银 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 一、nan和inf的简介 nan 不是一个数字 读取本地文件为flaot的时候,有缺失 inf(infinity): 无穷尽 inf: 正无穷 -inf: 负无穷 数据类型:float # 注意: 要想直接赋值nan和inf需要修改数组的数据类型为float 二、nan中的注意点 1、两个nan是不 阅读全文
posted @ 2019-12-01 23:16 市丸银 阅读(1479) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/woaixuexi9999/p/9247705.html 阅读全文
posted @ 2019-11-29 17:42 市丸银 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 一、安装Ubuntu18.04 省略 二、安装VmwareTool 1.选择机器右击安装2.打开文件,copy压缩文件到其它目录(理由: 内存不够解压)3.解压文件,运行./忘记名字了.pl文件4.注意安装的过程,不是所有的选项都选默认 三、Ubuntu解决复制粘贴的问题 目的:方便更换清华源 su 阅读全文
posted @ 2019-11-29 17:19 市丸银 阅读(1255) 评论(0) 推荐(0) 编辑
摘要: 一、创建特殊的数组 1、ones() 语法 np.ones(shape, dtype=None) # shape 创建数组的shape # dtype 指定数组的数据类型 例子 import numpy as np arr1 = np.ones((3, 4), dtype="int64") prin 阅读全文
posted @ 2019-11-28 23:35 市丸银 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 一、数组的拼接 1、水平拼接 a、格式 np.hstack((数组1, 数组2)) # 注意: 值是元祖 # 0轴长要相同 b、例子 import numpy as np arr1 = np.arange(0, 12).reshape(2, 6) arr2 = np.arange(12, 22).r 阅读全文
posted @ 2019-11-28 23:32 市丸银 阅读(321) 评论(0) 推荐(0) 编辑
摘要: 一、步骤 1、查找值 使用数组的索引和切片 2、修改值 直接赋值 例子 import numpy as np arr1 = np.arange(0, 24).reshape(4, 6) # 使用数组的索引和切片查找值,并修改值 arr1[:, 2:5] = 10 print(arr1) 二、查找值补 阅读全文
posted @ 2019-11-28 23:31 市丸银 阅读(925) 评论(0) 推荐(0) 编辑
摘要: 一、取行 1、单行 数组[index, :] # 取第index+1行 例子 import numpy as np arr1 = np.arange(0, 24).reshape(4, 6) # 取第2行数据 row1 = arr1[1, :] print(row1) 2、连续的多行 数组[star 阅读全文
posted @ 2019-11-28 23:29 市丸银 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 一、CSV文件 CSV: Comma-Separated Value,逗号分隔值文件 显示:表格状态 源文件:换行和逗号分隔,逗号 列,换行 行 二、读取数据 1、方法 loadtxt(fname, dtype=float, delimiter=None, skiprows=0, usecols=N 阅读全文
posted @ 2019-11-28 23:27 市丸银 阅读(714) 评论(0) 推荐(0) 编辑
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 67 下一页