code: def columnCount(self, index=QModelIndex()):
          
          if self.axis == 0:
              if self.total_cols <= self.cols_loaded:
                  return self.total_cols
              else:
                  return self.cols_loaded
          else:
              return max(1, self._shape[1])
docs: DataFrame column number