diff --git a/spyderlib/widgets/dicteditorutils.py b/spyderlib/widgets/dicteditorutils.py
index <HASH>..<HASH> 100644
--- a/spyderlib/widgets/dicteditorutils.py
+++ b/spyderlib/widgets/dicteditorutils.py
@@ -186,7 +186,7 @@ def value_to_display(value, truncate=False, trunc_len=80, minmax=False):
         return '%s  Mode: %s' % (address(value), value.mode)

     if isinstance(value, DataFrame):

         cols = value.columns

-        if PY2 and cols:

+        if PY2 and len(cols) > 0:

             # Get rid of possible BOM utf-8 data present at the

             # beginning of a file, which gets attached to the first

             # column header when headers are present in the first
Variable Explorer: Fix another freeze when creating DataFrames on PY 2

- This is a regression introduced when trying to fix issue #<I>