特牛网址导航

scala案例:平均温度案例和用户表和用户订单表的join案例_scala compactbuffer((guangzhou,32.0), (guangzhou,3-CSDN博客

网友收藏
文章浏览阅读288次。1. 平均温度案例:1.1 需求:求出各个地区的平均温度1.2 代码实现:package com.zxx.fuxiday05object AvgTemp { def main(args: Array[String]): Unit = { //数据 val d1 = Array(("beijing", 28.1), ("shanghai", 28.7), ("guangzhou", 32.0), ("shenzhen", 33.1)) val d2 = Arra_scala compactbuffer((guangzhou,32.0), (guangzhou,32.0), (guangzhou,33.3))