![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据分析
文章平均质量分 51
Lynne98
一个菜鸡
展开
-
数据分析笔试题
数据分析笔试题 数据: raw_data = {'platform': ['pcnews', 'pcnews', 'pcnews', 'pcnews', 'news', 'news', 'news', 'news', 'video', 'video', 'video', 'video'], 'order_num': ['1st', '1st', '2nd', '2nd', '1st', '1st', '2nd', '2nd','1st', '1st', '2nd', '2nd'],原创 2021-06-06 19:57:47 · 352 阅读 · 0 评论 -
数据分析——numpy
numpy库 ndarry多维数组 每个ndarry对象只有一个数据类型。大小固定,一旦确定不可更改 import numpy as np 创建ndarry数组 1、array() 2、ndarray() np.ndarry(shape=(m,n), dtype=int/float, buffer=np.array([0,1,2,3,4,5......]), offset=0, order="F/C") F 列为主,以shape=(2,3)为例,出来的数组就是 0,2,4 1,3,5 C 行为主,出原创 2020-09-20 10:39:32 · 69 阅读 · 0 评论 -
2020-09-19
读取文件 buffering 表示是否需要缓冲,默认-1 file_object = open(file,mode='r',buffering=-1) 写入文件 就要记得关文件不然后续数据容易丢失,采用with方法可以避免丢失 with open('test.txt','w') as file_object: file_object.write('hello world!') 写入一个字符串列表 writelines(se #例如: f = open('test.txt'..原创 2020-09-19 16:01:28 · 96 阅读 · 0 评论