上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 29 下一页
摘要: resample与groupby的区别:resample:在给定的时间单位内重取样groupby:对给定的数据条目进行统计函数原型:DataFrame.resample(rule, how=None, axis=0, fill_method=None, closed=None, label=None 阅读全文
posted @ 2016-06-18 16:07 罗兵 阅读(13738) 评论(1) 推荐(1) 编辑
摘要: 我们对 DataFrame 进行选择,大抵从这三个层次考虑:行列、区域、单元格。其对应使用的方法如下:一. 行,列 --> df[]二. 区域 --> df.loc[], df.iloc[], df.ix[]三. 单元格 --> df.at[], df.iat[] 下面开始练习: 1. df[]: 阅读全文
posted @ 2016-06-18 07:03 罗兵 阅读(51351) 评论(3) 推荐(2) 编辑
摘要: 1. 二项分布(离散) 2. 正态分布(连续) 阅读全文
posted @ 2016-06-15 04:32 罗兵 阅读(11082) 评论(0) 推荐(0) 编辑
摘要: 好处:避免类初始化时大量重复的赋值语句 用到了魔法__dict__ 阅读全文
posted @ 2016-06-13 09:17 罗兵 阅读(802) 评论(0) 推荐(0) 编辑
摘要: 通过下面的练习,加深对python字符编码的认识 python官方支持的编码格式大全:https://docs.python.org/3/library/codecs.html#standard-encodings 阅读全文
posted @ 2016-06-09 05:30 罗兵 阅读(1366) 评论(0) 推荐(0) 编辑
摘要: '''读取文件最后一行''' import os # 小文件:批量读取 def get_last_line(filename='mark.csv'): fullfilename = os.path.join(os.path.dirname(__file__), filename) with open(fullfilename, 'r', encoding='utf-8... 阅读全文
posted @ 2016-06-08 02:46 罗兵 阅读(2320) 评论(0) 推荐(0) 编辑
摘要: 预备知识 存储器位(bit),字节(byte),字(word), 双字(double word)1 byte = 8 bits1 word = 2 bytes = 16 bits1 double word = 2 words = 4 bytes = 32 bits ASCII编码 单字节来自远古时代 阅读全文
posted @ 2016-05-28 20:53 罗兵 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 1. 使用 flask-SQLAlchemy 扩展 2. 使用原生 SQLAlchemy 区别 阅读全文
posted @ 2016-05-26 07:08 罗兵 阅读(3297) 评论(0) 推荐(0) 编辑
摘要: 方式一/package1/ .../__init__.py .../class1.py .../class2.py /demo1.py ##################################### 方式二 /package2/.../__init__.py ... /class1.py 阅读全文
posted @ 2016-05-26 05:46 罗兵 阅读(691) 评论(0) 推荐(0) 编辑
摘要: #获取数据库 from sqlalchemy import create_engine db = create_engine("sqlite:///:memory:", echo=True) #创建表 db.execute(""" create table users( userid char(10), username char(50) ... 阅读全文
posted @ 2016-05-21 14:05 罗兵 阅读(2584) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 29 下一页