title: Changing the back ground color of rows in a dataframe using python styling
body: <p>I have a dataframe like this:</p>
  
  <pre><code>name       color parking_space
  0  Terminal 1, 2   Green Lot            40
  1     Terminal 4    Blue Lot            81
  2     Terminal 5  Yellow Lot            59
  3     Terminal 7  Orange Lot            45
  4     Terminal 8     Red Lot            31
  5      Long-Term         Lot            55
  </code></pre>
  
  <p>This is the data scraped using selenium.I want to change the background colour of the entire row based on the value of parking_space.
  here is the code that i have tried.But the output of this is the dataframe which is the same old database.
  code:</p>
  
  <pre><code>terminal_name=driver.find_elements_by_class_name("tp-h-mod")
  terminal_color=driver.find_elements_by_class_name("terminals-lot")
  terminal_capacity=driver.find_elements_by_class_name("terminal-percentage")
  mylist=[]
  mylist1=[]
  mylist2=[]
  list1=[]
  for data in terminal_name:
          mylist.append(data.text)
  for data in terminal_color:
          mylist1.append(data.text)
  for data in terminal_capacity:
          mylist2.append(data.text)
  for i in range(6):
      text=mylist2[i]
      m=text.split('%')[0]
      list1.append(m)
  df=pd.DataFrame({'name':mylist,'color':mylist1,'parking_space':list1})
  def highlight(row):
      if int(row.parking_space[:2]) &lt;= 25:
          return ['background-color: green']*3
      elif int(row.parking_space[:2]) &gt;=26 and int(row.parking_space[:2]) &lt;=50:
          return ['background-color:yellow']*3
      else:
          return ['background-color:red']*3
  df.style.apply(highlight, axis=1)
  print(df)
  path = 'C:/Users/InterCEP/Desktop/parking/'
  df.to_html(path+'parking.html')
  </code></pre>