round - ?保留數(shù)據(jù)精度?
如 round(col("col1"),0) 對(duì)應(yīng)數(shù)值為 21.23 -> 21.0 ;21.73 -> 22.0
如 round(col("col1"),1) 對(duì)應(yīng)數(shù)值為 21.23 -> 21.2
如 round(col("col1"),-1) 對(duì)應(yīng)數(shù)值為 21.23 -> 20.0
round - ?保留數(shù)據(jù)精度?
如 round(col("col1"),0) 對(duì)應(yīng)數(shù)值為 21.23 -> 21.0 ;21.73 -> 22.0
如 round(col("col1"),1) 對(duì)應(yīng)數(shù)值為 21.23 -> 21.2
如 round(col("col1"),-1) 對(duì)應(yīng)數(shù)值為 21.23 -> 20.0