title: Trying to replace a value in a sheet.row list that I have created from xlrd
body: <p>I imported an excel spreadsheet and I am trying to clean up empty values with default values in all rows in my spreadsheet. I don't need to update the spreadsheet, I just need to set default values because I am using this information to insert into a local database. Whenever I try to do so, it never gets processed correctly. Here is my original iteration of the code:</p>
  
  <pre><code>for root,dirs,files in os.walk(path):
  xlsfiles=['1128CNLOAD.xlsx']
  #xlsfiles=[ _ for _ in files if _.endswith('CNLOAD.xlsx') ]
  print (xlsfiles)
  for xlsfile in xlsfiles:
      book=xlrd.open_workbook(os.path.join(root,xlsfile))
      sheet=book.sheet_by_index(0)
      cell=sheet.cell(1,1)
      print (sheet)
  
      sheet0 = book.sheet_by_index(0)
      #sheet1 = book.sheet_by_index(1)
  
      for rownum in range(sheet0.nrows):
          print sheet0.row_values(rownum)
  
      values=()
  
      print sheet0.nrows 
  
      for row_index in range(1, sheet.nrows):
          if sheet.cell(row_index,4).value == '':
              sheet.cell(row_index,4).value = 0.0
          print sheet.row(row_index)
  </code></pre>
  
  <p>The code spits returns no errors but nothing gets updated and the cells I am trying to update are still empty.</p>
  
  <p>I also tried to change the loop to just do a value replace for the list which is seen below:</p>
  
  <pre><code>                for row_index in range(1, sheet.nrows):
                  if sheet.row(1)[4] == "empty:''":
                      sheet.row(1)[4] = "number:0.0"
  </code></pre>
  
  <p>When I print after running this update, the list has not changed.</p>
  
  <pre><code>print(sheet.row(1))
  </code></pre>
  
  <p>[text:u'FRFHF', text:u' ', number:0.15, number:0.15, empty:'', empty:'', number:2.5, number:2.5, empty:'', empty:'']</p>
  
  <p>Thank you for any help and let me know if you have any questions.</p>