'Cell content'

def data(self, index, role=Qt.DisplayRole):

    if (not index.isValid()):
        return to_qvariant()
    if ((role == Qt.DisplayRole) or (role == Qt.EditRole)):
        column = index.column()
        row = index.row()
        if (column == 0):
            return to_qvariant(to_text_string(self.df_index[row]))
        else:
            value = self.get_value(row, (column - 1))
            if isinstance(value, float):
                try:
                    return to_qvariant((self._format % value))
                except (ValueError, TypeError):
                    return to_qvariant((DEFAULT_FORMAT % value))
            else:
                try:
                    return to_qvariant(to_text_string(value))
                except UnicodeDecodeError:
                    return to_qvariant(encoding.to_unicode(value))
    elif (role == Qt.BackgroundColorRole):
        return to_qvariant(self.get_bgcolor(index))
    elif (role == Qt.FontRole):
        return to_qvariant(get_font(font_size_delta=DEFAULT_SMALL_DELTA))
    return to_qvariant()
