04 2022 档案

摘要:学生课程分数 1.持久化 scm.cache() 2.总共有多少学生?map(), distinct(), count() 3.开设了多少门课程? 4.生成(姓名,课程分数)键值对RDD,观察keys(),values() 5.每个学生选修了多少门课?map(), countByKey() 6.每门 阅读全文
posted @ 2022-04-20 16:53 ../已被使用 阅读(41) 评论(0) 推荐(0)
摘要:一、词频统计 1.准备文件 2.读文件创建RDD 3.分词 4.排除大小写lower(),map() 标点符号re.split(pattern,str),flatMap(), 停用词,可网盘下载stopwords.txt,filter(), 长度小于2的词filter() 5.统计词频 6.按词频排 阅读全文
posted @ 2022-04-06 11:58 ../已被使用 阅读(31) 评论(0) 推荐(0)