Repository: spyder-ide/spyder

Issue:
Crash when displaying a pandas data frame with a column containing a data frame
<!--- **PLEASE READ:** Before submitting here, please carefully consult our *Troubleshooting Guide*: https://github.com/spyder-ide/spyder/wiki/Troubleshooting-Guide-and-FAQ and search the issues page for your error/problem, as most posted bugs are duplicates or easy fixes.

If you don't find anything, please provide a detailed step-by-step description (in English) of the problem and what led up to it below. Issue reports without a clear way to reproduce them will be closed. Thanks! --->

## Problem Description

### What steps will reproduce the problem?

1. Create a column in a pandas data frame which contains a dataframe in each element.
2. Double click on the data frame in the "variable explorerer" and try to look through the data. 
3. When the column containing the dataframe is to be shown on screen Spyder crashes.

### Traceback

<details>

```python-traceback
  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
```

</details>

## Package Versions

* Spyder version: 3.2.8 
* Python version: 3.6.4
* Qt version: 5.6.2
* PyQt5 version: 5.6
* Operating system: Windows 10

### Dependencies

```
pyflakes >=0.6.0 :  1.6.0 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pygments >=2.0   :  2.2.0 (OK)
pandas >=0.13.1  :  0.22.0 (OK)
numpy >=1.7      :  1.14.0 (OK)
sphinx >=0.6.6   :  1.6.6 (OK)
rope >=0.9.4     :  0.10.7 (OK)
jedi >=0.9.0     :  0.11.1 (OK)
nbconvert >=4.0  :  5.3.1 (OK)
sympy >=0.7.3    :  1.1.1 (OK)
cython >=0.21    :  0.27.3 (OK)
qtconsole >=4.2.0:  4.3.1 (OK)
IPython >=4.0    :  6.2.1 (OK)
pylint >=0.25    :  1.8.2 (OK)
```



Discussion:
Thanks for reporting. We can catch the error at least, but it really isn't a good idea to have a DataFrame within a DataFrame, both for compatibility and performance; much better to use a MultiIndex than go full DataFrameception. @ccordoba12 should we catch this?
Sure, we need to.
I can't reproduce this error with the following dataframe:

    df = pd.DataFrame([pd.DataFrame([1,2]), pd.DataFrame([2,3]), pd.DataFrame([3,1])])

@lassebv, please give us an example dataframe that is generating this error for you.

Resolving patch:
diff --git a/spyder/widgets/variableexplorer/dataframeeditor.py b/spyder/widgets/variableexplorer/dataframeeditor.py
--- a/spyder/widgets/variableexplorer/dataframeeditor.py
+++ b/spyder/widgets/variableexplorer/dataframeeditor.py
@@ -105,6 +105,7 @@ def __init__(self, dataFrame, format=DEFAULT_FORMAT, parent=None):
         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]
@@ -306,11 +307,19 @@ def data(self, index, role=Qt.DisplayRole):
                     # what is shown by Spyder
                     return value
                 else:
-                    return to_qvariant(to_text_string(value))
+                    try:
+                        return to_qvariant(to_text_string(value))
+                    except Exception:
+                        self.display_error_idxs.append(index)
+                        return u'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()
 
     def sort(self, column, order=Qt.AscendingOrder):
@@ -365,6 +374,8 @@ def setData(self, index, value, role=Qt.EditRole, change_type=None):
         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)


Test patch: