code: def rename(self, old_fieldname, new_fieldname):
          
          if old_fieldname not in self:
              raise Exception("DataTable does not have field `%s`" %
                              old_fieldname)
  
          if not isinstance(new_fieldname, basestring):
              raise ValueError("DataTable fields must be strings, not `%s`" %
                               type(new_fieldname))
  
          if old_fieldname == new_fieldname:
              return
  
          new_names = self.fields
          location = new_names.index(old_fieldname)
          del new_names[location]
          new_names.insert(location, new_fieldname)
          self.fields = new_names
docs: Renames a specific field, and preserves the underlying order.