给出工作表:
A| B | C = SUM($D2:$Z2) | D | E | F | ...
如果4:50
,我如何在一定范围的行(例如:Cx:Zx
)中为列x
(对于行Bx > Cx
)着色scala> val df1 = Seq(("n3_testindia1"),("n2_stagamerica2"),("n1_prodeurope2")).toDF("location1")
df1: org.apache.spark.sql.DataFrame = [location1: string]
scala> val df2 = Seq(("test-india-1"),("stag-america-2"),("prod-europe-2")).toDF("loc1")
df2: org.apache.spark.sql.DataFrame = [loc1: string]
scala> df1.join(df2,split('location1,"_")(1) === regexp_replace('loc1,"-",""),"inner").show
+---------------+--------------+
| location1| loc1|
+---------------+--------------+
| n3_testindia1| test-india-1|
|n2_stagamerica2|stag-america-2|
| n1_prodeurope2| prod-europe-2|
+---------------+--------------+
scala>
,每一行和/或每一列的规则?
(假设有很多行和很多列。)
答案 0 :(得分:1)
关于Stackoverflow的一些问答可以为您提供帮助。特别是Conditional formatting based on another cell's value和Zig Mandel的答案(带有注释)。提醒您,在提出新问题之前,一定要使用Google搜寻。
=$B2:$B>$C2:$C
屏幕截图