
python常用写法
zhuiqiuuuu
这个作者很懒,什么都没留下…
展开
-
pyspark sql createGlobalTempView和createOrReplaceTempView
createGlobalTempView(name)Creates a global temporary view with this DataFrame.The lifetime of this temporary view is tied to this Spark application. throws TempTableAlreadyExistsException, if th原创 2017-09-24 16:24:14 · 5318 阅读 · 0 评论 -
Python 将每行的前len-1列数据抽成一个矩阵,将最后的一列作为另一个矩阵
作用:将每行的前len-1列数据抽成一个矩阵,将最后的一列作为另一个矩阵每行各数据间隔是tab(\t)def loadDataSet(fileName): #general function to parse tab -delimited floats numFeat = len(open(fileName).readline().split('\t')) - 1 #ge原创 2017-09-03 11:53:02 · 2501 阅读 · 0 评论