title: coloring rows in pandas based on integer index
body: <p>I would like to color my rows based on my list of integer such that:
  if my integer is = [3, 10, 12]</p>
  <p>the coloring of pandas style should be:</p>
  <p><a href="https://i.stack.imgur.com/zd9fx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zd9fx.png" alt="pandas color table" /></a></p>
  <p>I was trying to do what <a href="https://stackoverflow.com/questions/40335140/how-to-highlight-both-a-row-and-a-column-at-once-in-pandas">How to highlight both a row and a column at once in pandas</a> did. but didnt get what i want, snippets of my code:</p>
  <pre><code>color = ['red','green','blue','orange','yellow'] 
  idx_list = [3, 10, 12]
  
  def color_row(x):
      bc = []
      for i in x:
          for j, idx in enumerate(idx_list):
              c = 'background: '+color[j]
              if x.name &lt;= idx:
                  bc.append(c)
      return bc
  
  df.style.apply(color_row,axis=1)
  </code></pre>
  <p>and got this error:</p>
  <pre><code>ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
  </code></pre>
  <p>what did I miss?</p>