# Buggy code
def setData(self, index, value, role=Qt.EditRole, change_type=None):
    """Cell content change"""
    column = index.column()
    row = index.row()

    if change_type is not None:
        try:
            value = self.data(index, role=Qt.DisplayRole)
            val = from_qvariant(value, str)
            if change_type is bool:
                val = bool_false_check(val)
            self.df.iloc[row, column - 1] = change_type(val)
        except ValueError:
            self.df.iloc[row, column - 1] = change_type("0")
    else:
        val = from_qvariant(value, str)
        current_value = self.get_value(row, column - 1)
        if isinstance(current_value, (bool, np.bool_)):
            val = bool_false_check(val)
        supported_types = (bool, np.bool_) + REAL_NUMBER_TYPES
        if isinstance(current_value, supported_types) or is_text_string(current_value):
            try:
                self.df.iloc[row, column - 1] = current_value.__class__(val)
            except (ValueError, OverflowError) as e:
                QMessageBox.critical(
                    self.dialog, "Error", str(type(e).__name__) + ": " + str(e)
                )
                return False
        else:
            QMessageBox.critical(
                self.dialog,
                "Error",
                "Editing dtype {0!s} not yet supported.".format(
                    type(current_value).__name__
                ),
            )
            return False
    self.max_min_col_update()
    self.dataChanged.emit(index, index)
    return True


# 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 setData(self, index, value, role=Qt.EditRole, change_type=None):
    """Cell content change"""
    column = index.column()
    row = index.row()

    if index in self.display_error_idxs:
        return False
    if change_type is not None:
        try:
            value = self.data(index, role=Qt.DisplayRole)
            val = from_qvariant(value, str)
            if change_type is bool:
                val = bool_false_check(val)
            self.df.iloc[row, column - 1] = change_type(val)
        except ValueError:
            self.df.iloc[row, column - 1] = change_type("0")
    else:
        val = from_qvariant(value, str)
        current_value = self.get_value(row, column - 1)
        if isinstance(current_value, (bool, np.bool_)):
            val = bool_false_check(val)
        supported_types = (bool, np.bool_) + REAL_NUMBER_TYPES
        if isinstance(current_value, supported_types) or is_text_string(current_value):
            try:
                self.df.iloc[row, column - 1] = current_value.__class__(val)
            except (ValueError, OverflowError) as e:
                QMessageBox.critical(
                    self.dialog, "Error", str(type(e).__name__) + ": " + str(e)
                )
                return False
        else:
            QMessageBox.critical(
                self.dialog,
                "Error",
                "Editing dtype {0!s} not yet supported.".format(
                    type(current_value).__name__
                ),
            )
            return False
    self.max_min_col_update()
    self.dataChanged.emit(index, index)
    return True