code: def headerData(self, section, orientation, role):
          
          if role == Qt.DisplayRole:
              if self._separateFieldOrientation == orientation:
  
                  nFields = len(self._fieldNames)
                  varNr = section // nFields
                  fieldNr = section % nFields
                  header = str(varNr) + ' : ' if self._numbersInHeader else ''
                  header += self._fieldNames[fieldNr]
                  return header
              else:
                  return str(section)
          else:
              return None
docs: Returns the header for a section (row or column depending on orientation).
              Reimplemented from QAbstractTableModel to make the headers start at 0.