code: def sort(self, fieldname, key=lambda x: x, desc=False, inplace=False):
          try:
              field_index = tuple(self.fields).index(fieldname)
          except ValueError:
              raise ValueError("Sorting on a field that doesn't exist: `%s`" %
                               fieldname)
          data_cols = izip(*sorted(izip(*[self.__data[field]
                                          for field in self.fields]),
                                   key=lambda row: key(row[field_index]),
                                   reverse=desc))
          target_table = self if inplace else DataTable()
          for field, data_col in izip(self.fields, data_cols):
              target_table[field] = list(data_col)
          return target_table