2018年12月6日
摘要: df.to_excel(outpath,float_format='%.2f') 阅读全文
posted @ 2018-12-06 12:39 hailuo 阅读(8773) 评论(0) 推荐(1) 编辑
  2018年9月21日
摘要: import os pathss=[] for root, dirs, files in os.walk(tarpath): path = [os.path.join(root, name) for name in files] #print(path) pathss.extend(path) 阅读全文
posted @ 2018-09-21 14:29 hailuo 阅读(3143) 评论(1) 推荐(0) 编辑
  2018年9月14日
摘要: 阅读全文
posted @ 2018-09-14 11:28 hailuo 阅读(1167) 评论(0) 推荐(0) 编辑
摘要: val list1=List.range(0,5) val list2=List.range(0,2) val list3=List(0,6) list1.contains(2) list1.containsSlice(list2) list1.containsSlice(list3) 阅读全文
posted @ 2018-09-14 10:02 hailuo 阅读(1390) 评论(0) 推荐(0) 编辑
  2018年9月10日
摘要: val name="Fred" val age=20 val weight=150.00 val dd="%s's age is %d,weighs %.2f".format(name,age,weight) 阅读全文
posted @ 2018-09-10 12:56 hailuo 阅读(2102) 评论(0) 推荐(0) 编辑
  2018年9月7日
摘要: from pyspark import SparkContext, SparkConf import os from pyspark.sql.session import SparkSession from pyspark.sql import Row def CreateSparkContex(): sparkconf = SparkConf().setAppName("MYPRO").s... 阅读全文
posted @ 2018-09-07 11:09 hailuo 阅读(7665) 评论(0) 推荐(0) 编辑
  2018年9月5日
摘要: from pyspark import SparkContext,SparkConf import os from pyspark.sql.session import SparkSession def CreateSparkContex(): sparkconf=SparkConf().setAppName("MYPRO").set("spark.ui.showConsoleProgres... 阅读全文
posted @ 2018-09-05 13:40 hailuo 阅读(9387) 评论(0) 推荐(0) 编辑
  2018年8月31日
摘要: 以上说明出自林大贵老师关于Hadoop、spark书籍,如有兴趣请自行搜索购买! 这是我的GitHub分享的一些笔记:https://github.com/mahailuo/pyspark_notes 阅读全文
posted @ 2018-08-31 11:15 hailuo 阅读(218) 评论(0) 推荐(0) 编辑
  2018年8月28日
摘要: 阅读全文
posted @ 2018-08-28 14:28 hailuo 阅读(194) 评论(0) 推荐(0) 编辑
  2018年8月27日
摘要: hadoop fs -cat hadoop fs -cat |more #more参数可是分页显示文件内容 echo abcd | hadoop fs -put - #将打印到屏幕的内容保存到hdfs hadoop fs -cat ls | hadoop fs -put #将本地目录下的文件名保存到hdfs文件中 hadoop fs -copyToLocal #复制... 阅读全文
posted @ 2018-08-27 15:59 hailuo 阅读(227) 评论(0) 推荐(0) 编辑