I need to color rows in my DataFrame, according to the condition depending on some column. For example:

```
test = pd.DataFrame({"A": [1,2,3,4,5], "B":[5,3,2,1,4]})

def color(score):
    return f"background-color:" + (" #ffff00;" if score < 4 else "#ff0000") 

test.style.applymap(color, subset = ["A"])

```

But in this way I get color only at `A` column:

![single column color](https://i.stack.imgur.com/KBTo5.png)

Also i can code like this:

```
def color1(score):
    return f"background-color: #ffff00;" 
def color2(score):
    return f"background-color: #ff0000;" 

temp = test.style.applymap(color1, subset = (test[test["A"]< 4].index, slice(None)))
temp.applymap(color2, subset = (test[test["A"] >= 4].index, slice(None)))

```

In this way color will be ok, but i struggle multiple calls of `applymap` functions. Is there any way to fulfill my goal without the multiple calls?