code: def headerData(self, section, orientation, role):
          
          if role == Qt.TextAlignmentRole:
              if orientation == Qt.Horizontal:
                  return Qt.AlignCenter | Qt.AlignBottom
              else:
                  return Qt.AlignRight | Qt.AlignVCenter
          if role != Qt.DisplayRole and role != Qt.ToolTipRole:
              return None
          if self.axis == 1 and self._shape[1] <= 1:
              return None
          orient_axis = 0 if orientation == Qt.Horizontal else 1
          if self.model.header_shape[orient_axis] > 1:
              header = section
          else:
              header = self.model.header(self.axis, section)
  
              # Don't perform any conversion on strings
              # because it leads to differences between
              # the data present in the dataframe and
              # what is shown by Spyder
              if not is_type_text_string(header):
                  header = to_text_string(header)
  
          return header
docs: Get the information to put in the header.