啊峰哥

05 2018 档案

7 面向对象和图形界面
摘要:7.4 GUI的基本框架 常用组件 按钮 菜单 静态文本和文本 列表 单选框和复选框 布局管理(sizer) 阅读全文

posted @ 2018-05-31 21:00 啊峰哥 阅读(194) 评论(0) 推荐(0)

6 python高级数据处理和可视化
摘要:6.2. pyplot作图1.折线图和散点图 t = np.arange(0,4,0.1) plt.plot(t,t,'o',t,t+2,t,t**2,'o') plt.show()2.柱线图 plt.bar(x,y)6.3. pylab作图同理 t = np.arange(0,4,0.1) pl.plot(t,t+2) pl.show()6.4.pa... 阅读全文

posted @ 2018-05-30 21:13 啊峰哥 阅读(270) 评论(0) 推荐(0)

5.1 便捷数据获取
摘要:1.requests 获取 建立pd矩阵处理数据 pd.DataFrame(),pd.read_csv() 2.Webapi获取,如豆瓣API 3.NLTK语料库获取 5.4 数据选择 通过标签或者位置 djidf.code 或者djidf[‘code’] loc 通过标签来选择行或者列 也可以通过djid... 阅读全文

posted @ 2018-05-20 20:45 啊峰哥 阅读(189) 评论(0) 推荐(0)

4 扩展库Scipy
摘要:https://www.scipy.org/ 1. numpy 矩阵 2. matplotlib 绘图库 3. pandas 高效的Series和DataFrame数据结构4.5 ndarry .ndim#秩 .shape#维度 .size#元素个数 切片 运算 4.6 变长字典Se... 阅读全文

posted @ 2018-05-12 23:51 啊峰哥 阅读(251) 评论(0) 推荐(0)

4.3 集合
摘要:不重复,可对列表进行去重复处理 set(), frozenset() , 阅读全文

posted @ 2018-05-12 22:58 啊峰哥 阅读(109) 评论(0) 推荐(0)

4.1字典
摘要:1.生成字典 names = [] ,salaries = [] ,dict[zip(names,salaries)] dic = {key1:value1,key2:value2} dic = dict([[key1,value1],[key2,value2]]) dic = dict(([key1,value1],[key2,value2])) dic = ... 阅读全文

posted @ 2018-05-12 22:48 啊峰哥 阅读(102) 评论(0) 推荐(0)

3.2 网络数据获取
摘要:1. 获取网页r = requests.get(url) r.status_coder.text r.content r.json() r.encoding = ‘utf8’例子a.假设获取的是二进制文件,则可以借鉴如下方法保存数据:r = requests.get('http://www.baidu.com/img/bd_logo1.png',headers=headers)with o... 阅读全文

posted @ 2018-05-10 22:56 啊峰哥 阅读(140) 评论(0) 推荐(0)

3.1本地数据获取
摘要:1. 文件的打开 with open(‘filename’ ,mode=’r’,buffering=1,…) as f: f.read() f.write() f.readline() f.readlines() f.writelines() f.seek(offset,wheace=0) f.se 阅读全文

posted @ 2018-05-10 22:34 啊峰哥 阅读(165) 评论(0) 推荐(0)

导航