01 2016 档案

gmail及youtube
摘要:墙内访问youtube没有特别好的方法,只找到一个,提供格式转换和下载:http://new.cloudfile.co/transfer1. 修改host文件,照常用网页访问。有人会提供最新host文件:http://blog.my-eclipse.cn/host-google.html2. 网页可... 阅读全文

posted @ 2016-01-17 13:03 arsh 阅读(454) 评论(0) 推荐(0)

行处理——运算
摘要:基于pandas求和。column_list = ['Fiber_TD_(g)', 'Sugar_Tot_(g)']# Let's sum up the total amount of fiber and sugar across all the foods.total = food_info[co... 阅读全文

posted @ 2016-01-13 23:52 arsh 阅读(272) 评论(0) 推荐(0)

列处理——归一化
摘要:基于pandasall_columns = list(food_info.columns.values)#the first two columns don't need to be normalizedall_columns = all_columns[2:len(all_columns)]for... 阅读全文

posted @ 2016-01-13 23:26 arsh 阅读(710) 评论(0) 推荐(0)

行处理——排序
摘要:基于pandasascending_fat_then_ascending_sodium = food_info.sort(["Lipid_Tot_(g)", "Sodium_(mg)"], ascending=[True, True])#get the first three food top_th... 阅读全文

posted @ 2016-01-13 23:02 arsh 阅读(228) 评论(0) 推荐(0)

条件过滤
摘要:----------------基于numpyworld_alcolhol是numpy的array类型。输入:matrix; 输出:matrix# Boolean vector corresponding to Canada and 1986.canada_1986_boolean = (world... 阅读全文

posted @ 2016-01-13 21:58 arsh 阅读(338) 评论(0) 推荐(0)

列处理——列间运算
摘要:基于pandas直接相加# Adding up all of the fat columns.# food_info is a dataframe# Adding two columns will go through and add each value at each position to t... 阅读全文

posted @ 2016-01-13 21:57 arsh 阅读(288) 评论(0) 推荐(0)

读入文件
摘要:python本身方法:f=open("xx.csv","r")b=f.read()rows=b.split('\n')full_data = []for row in rows: cols_in_a_row=row.split(',') full_data.append(cols_in_... 阅读全文

posted @ 2016-01-09 12:56 arsh 阅读(241) 评论(0) 推荐(0)

列处理——截取
摘要:#input is a list named legislators, the first two elements looks like this:#[['Bassett', 'Richard', '1745-04-02', 'M', 'sen', 'DE', 'Anti-Administrati... 阅读全文

posted @ 2016-01-05 20:35 arsh 阅读(172) 评论(0) 推荐(0)

列处理——格式转换(考虑非法值)
摘要:----------------基于普通python#first two elements of list legislators.#[['Bassett', 'Richard', '1745-04-02', 'M', 'sen', 'DE', 'Anti-Administration', '174... 阅读全文

posted @ 2016-01-05 20:35 arsh 阅读(181) 评论(0) 推荐(0)

列处理——寻找并处理非法值
摘要:#input is a list named legislators, the first two elements looks like this:#[['Bassett', 'Richard', '1745-04-02', 'M', 'sen', 'DE', 'Anti-Administrati... 阅读全文

posted @ 2016-01-05 20:17 arsh 阅读(180) 评论(0) 推荐(0)

简单的数据处理过程
摘要:dataquest上第一个challenge,很简单,但是也可以得到一般的数据处理过程。 这个challenge是从一个csv文件中读入名字和使用的人数,需要得到使用人数大于1000的名字。 1. 读入数据。(open,read) 2. 存储到合适的数据结构中。(split into list... 阅读全文

posted @ 2016-01-05 19:37 arsh 阅读(204) 评论(0) 推荐(0)

统计题5
摘要:可汗统计课56 We're trying to test whether a new, low-fat diet actually helps obese people lose weight. 100 randomly assigned obese people are assigned to g 阅读全文

posted @ 2016-01-03 11:57 arsh 阅读(297) 评论(0) 推荐(0)

test 公式
摘要:$\vec{a} \cdot \vec{b}=0$ 阅读全文

posted @ 2016-01-03 09:59 arsh 阅读(195) 评论(0) 推荐(0)

ECONOMETRICS CHAPTER3
摘要:前几天看王垠的一篇文章谈数学与编程,说数学公式之所以难以理解是因为缺乏统一的形式,而且经常有未定义的变量出现。看这本书时也正有此感,所以有时不必要拘泥公式是否前后一致,理解意思要紧。♣普通最小二乘法ordinary least squares,OLSŶi=β1+β2Xiûi=Yi-Ŷi(加帽表示这是... 阅读全文

posted @ 2016-01-02 21:16 arsh 阅读(316) 评论(0) 推荐(0)

导航