# Buggy code
def data(self, index, role=Qt.DisplayRole):
    """Cell content"""
    if not index.isValid():
        return to_qvariant()
    if role == Qt.DisplayRole or role == Qt.EditRole:
        column = index.column()
        row = index.row()
        if column == 0:
            df_idx = self.df_index[row]
            if is_type_text_string(df_idx):
                # 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
                return df_idx
            else:
                return to_qvariant(to_text_string(df_idx))
        else:
            value = self.get_value(row, column - 1)
            if isinstance(value, float):
                try:
                    return to_qvariant(self._format % value)
                except (ValueError, TypeError):
                    # may happen if format = '%d' and value = NaN;
                    # see issue 4139
                    return to_qvariant(DEFAULT_FORMAT % value)
            elif is_type_text_string(value):
                # 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
                return value
            else:
                return to_qvariant(to_text_string(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()


# Traceback (ValueError)
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity
Traceback (most recent call last):
File "C:\Python\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\dataframeeditor.py", line 295, in data
return to_qvariant(to_text_string(value))
File "C:\Python\anaconda3\lib\site-packages\spyder\py3compat.py", line 140, in to_text_string
return str(obj)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\base.py", line 59, in __str__
return self.__unicode__()
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 636, in __unicode__
line_width=width, show_dimensions=show_dimensions)
File "C:\Python\anaconda3\lib\site-packages\pandas\core\frame.py", line 1675, in to_string
formatter.to_string()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 597, in to_string
strcols = self._to_str_columns()
File "C:\Python\anaconda3\lib\site-packages\pandas\io\formats\format.py", line 537, in _to_str_columns
max_len = max(np.max([self.adj.len(x) for x in fmt_values]),
File "C:\Python\anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python\anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity

# Fixed code
def data(self, index, role=Qt.DisplayRole):
    """Cell content"""
    if not index.isValid():
        return to_qvariant()
    if role == Qt.DisplayRole or role == Qt.EditRole:
        column = index.column()
        row = index.row()
        if column == 0:
            df_idx = self.df_index[row]
            if is_type_text_string(df_idx):
                # 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
                return df_idx
            else:
                return to_qvariant(to_text_string(df_idx))
        else:
            value = self.get_value(row, column - 1)
            if isinstance(value, float):
                try:
                    return to_qvariant(self._format % value)
                except (ValueError, TypeError):
                    # may happen if format = '%d' and value = NaN;
                    # see issue 4139
                    return to_qvariant(DEFAULT_FORMAT % value)
            elif is_type_text_string(value):
                # 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
                return value
            else:
                try:
                    return to_qvariant(to_text_string(value))
                except Exception:
                    self.display_error_idxs.append(index)
                    return "Display Error!"
    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))
    elif role == Qt.ToolTipRole:
        if index in self.display_error_idxs:
            return _(
                "It is not possible to display this value because\n"
                "an error ocurred while trying to do it"
            )
    return to_qvariant()