2017-12-27 13 views

Antwort

0

Sie benötigen eine Kombination aus concat und lit

spark.select(col("col1"), col("col2"), col("costs")) 
    .groupBy("col1") 
    .agg(sum(col("costs")).as("costs")) 
    .withColumn("costs" , concat(lit("$") , col("costs"))) ; 
verwenden
Verwandte Themen