title: Change color of complete row in data frame in pandas
body: <p>I have applied pandas on an excel file and below is the dataframe :</p>
  
  <pre><code>      Name  Count
  0   Name 1     75
  1   Name 2     55
  2   Name 3     50
  3   Name 4     47
  4   Name 5     43
  5   Name 6     42
  6   Name 7     35
  7   Name 8     34
  8   Name 9     32
  9   Name 10    16
  10  Name 11     6
  11  Name 12     3
  12  Name 13     1
  13  Name 14     1
  14    Total   440
  </code></pre>
  
  <p>I have to apply conditional formatting on above data frame and convert in to html.</p>
  
  <p>I followed style "<a href="http://pandas.pydata.org/pandas-docs/stable/style.html#Building-Styles" rel="nofollow noreferrer">http://pandas.pydata.org/pandas-docs/stable/style.html#Building-Styles</a>" for this and did below :</p>
  
  <pre><code>def change_colour(val):
     return ['background-color: red' if x &lt; 40 else 'background-color: green' for x in val]
  
  name_column_html_1 = final_name_df.style.apply(change_colour, axis=1, subset=['Count'])
  print(name_column_html_1.render())
  </code></pre>
  
  <p>This is the output I am getting from above code</p>
  
  <p><a href="https://i.stack.imgur.com/zkPxS.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zkPxS.jpg" alt="This is the output I am getting"></a></p>
  
  <p>How can i get output like below ?</p>
  
  <p><a href="https://i.stack.imgur.com/aKNSq.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aKNSq.jpg" alt="How can i output like this"></a></p>