摘要: 阅读全文
posted @ 2017-12-06 17:09 Groupe 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-12-06 17:08 Groupe 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-12-06 16:38 Groupe 阅读(128) 评论(0) 推荐(0) 编辑
摘要: data.frame( ) 数据框创建mydata <- data.frame(col1,col2,col3,...,stringAsFactors=FALSE)其中col1,col2,col3,... 可为任何类型(如字符型、数值型或逻辑型 。不将字符型数据转为枚举类型mydata<-transf 阅读全文
posted @ 2017-12-05 11:40 Groupe 阅读(330) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-09-22 19:00 Groupe 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 1、读写文本格式的数据pandas提供了一些用于将表格型数据读取为DataFrame对象的函数。文件导入,使用read_csv将数据导入一个DataFramedf= pd.read_csv('B:/test/ch06/ex1.csv')dfOut[142]: a b c d mes... 阅读全文
posted @ 2015-11-06 18:17 Groupe 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 1、sum函数df = pd.DataFrame([[1.4,np.nan],[7.1,-4.5],[np.nan,np.nan],[0.75,-1.3]],index = ['a','b','c','d'],columns = ['one','two'])dfOut[6]: one tw... 阅读全文
posted @ 2015-11-05 09:43 Groupe 阅读(1452) 评论(0) 推荐(0) 编辑
摘要: 1、重新索引obj = pd.Series([4.5,7.2,-5.3,3.6],index = ['d','b','a','c'])objOut[41]: d 4.5b 7.2a -5.3c 3.6dtype: float64obj2 = obj.reindex(['a','... 阅读全文
posted @ 2015-11-04 18:28 Groupe 阅读(313) 评论(0) 推荐(0) 编辑
摘要: 1、Seriesseries是类似于一维数组的对象,它是由一组数据以及与之相关的数据标签(即索引)组成,仅由一组数据即可产生最简单的series:p=pd.Series([1,2,4,3])pOut[5]: 0 11 22 43 3dtype: int64p.valuesOu... 阅读全文
posted @ 2015-11-03 13:58 Groupe 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 1、线性代数argmax()函数y=f(x),x0= argmax(f(x)) 的意思就是参数x0满足f(x0)为f(x)的最大值;换句话说就是 argmax(f(x))是使得 f(x)取得最大值所对应的变量x。any(x) 方法def any(iterable): for element in... 阅读全文
posted @ 2015-10-27 20:16 Groupe 阅读(346) 评论(0) 推荐(0) 编辑