(self, column, role)
Return a sequence of source table objects which can be used as
        `keys` for sorting.

        :param int column: Sort column.
        :param Qt.ItemRole role: Sort item role.
Return a sequence of source table objects which can be used as
        `keys` for sorting.
Return a sequence of source table objects which can be used as keys for sorting .
def _columnSortKeyData(self, column, role):
        """
        Return a sequence of source table objects which can be used as
        `keys` for sorting.

        :param int column: Sort column.
        :param Qt.ItemRole role: Sort item role.

        """
        coldesc = self.columns[column]
        if isinstance(coldesc, TableModel.Column) \
                and role == TableModel.ValueRole:
            col_data = numpy.asarray(self.source.get_column_view(coldesc.var)[0])

            if coldesc.var.is_continuous:
                # continuous from metas have dtype object; cast it to float
                col_data = col_data.astype(float)
            return col_data
        else:
            return numpy.asarray([self.index(i, column).data(role)
                                  for i in range(self.rowCount())])
def _columnSortKeyData ( self , column , role ) : coldesc = self . columns [ column ] if isinstance ( coldesc , TableModel . Column ) and role == TableModel . ValueRole : col_data = numpy . asarray ( self . source . get_column_view ( coldesc . var ) [ 0 ] ) if coldesc . var . is_continuous : # continuous from metas have dtype object; cast it to float col_data = col_data . astype ( float ) return col_data else : return numpy . asarray ( [ self . index ( i , column ) . data ( role ) for i in range ( self . rowCount ( ) ) ] )