# Buggy code
def __init__(self, dataFrame, format=DEFAULT_FORMAT, parent=None):
    QAbstractTableModel.__init__(self)
    self.dialog = parent
    self.df = dataFrame
    self.df_index = dataFrame.index.tolist()
    self.df_header = dataFrame.columns.tolist()
    self._format = format
    self.complex_intran = None

    self.total_rows = self.df.shape[0]
    self.total_cols = self.df.shape[1]
    size = self.total_rows * self.total_cols

    self.max_min_col = None
    if size < LARGE_SIZE:
        self.max_min_col_update()
        self.colum_avg_enabled = True
        self.bgcolor_enabled = True
        self.colum_avg(1)
    else:
        self.colum_avg_enabled = False
        self.bgcolor_enabled = False
        self.colum_avg(0)

    # Use paging when the total size, number of rows or number of
    # columns is too large
    if size > LARGE_SIZE:
        self.rows_loaded = ROWS_TO_LOAD
        self.cols_loaded = COLS_TO_LOAD
    else:
        if self.total_rows > LARGE_NROWS:
            self.rows_loaded = ROWS_TO_LOAD
        else:
            self.rows_loaded = self.total_rows
        if self.total_cols > LARGE_COLS:
            self.cols_loaded = COLS_TO_LOAD
        else:
            self.cols_loaded = self.total_cols


# 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 __init__(self, dataFrame, format=DEFAULT_FORMAT, parent=None):
    QAbstractTableModel.__init__(self)
    self.dialog = parent
    self.df = dataFrame
    self.df_index = dataFrame.index.tolist()
    self.df_header = dataFrame.columns.tolist()
    self._format = format
    self.complex_intran = None
    self.display_error_idxs = []

    self.total_rows = self.df.shape[0]
    self.total_cols = self.df.shape[1]
    size = self.total_rows * self.total_cols

    self.max_min_col = None
    if size < LARGE_SIZE:
        self.max_min_col_update()
        self.colum_avg_enabled = True
        self.bgcolor_enabled = True
        self.colum_avg(1)
    else:
        self.colum_avg_enabled = False
        self.bgcolor_enabled = False
        self.colum_avg(0)

    # Use paging when the total size, number of rows or number of
    # columns is too large
    if size > LARGE_SIZE:
        self.rows_loaded = ROWS_TO_LOAD
        self.cols_loaded = COLS_TO_LOAD
    else:
        if self.total_rows > LARGE_NROWS:
            self.rows_loaded = ROWS_TO_LOAD
        else:
            self.rows_loaded = self.total_rows
        if self.total_cols > LARGE_COLS:
            self.cols_loaded = COLS_TO_LOAD
        else:
            self.cols_loaded = self.total_cols