Repository: modin-project/modin

Issue:
df.describe causes errors when boolean values are the only dtype in a partition

### Describe the problem
<!-- Describe the problem clearly here. -->
`df.describe` causes this error

### Source code / logs

```
In [2]: data.describe()                                                                                                                      
Out[2]: ---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/IPython/core/formatters.py in __call__(self, obj)
    700                 type_pprinters=self.type_printers,
    701                 deferred_pprinters=self.deferred_printers)
--> 702             printer.pretty(obj)
    703             printer.flush()
    704             return stream.getvalue()

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/IPython/lib/pretty.py in pretty(self, obj)
    400                         if cls is not object \
    401                                 and callable(cls.__dict__.get('__repr__')):
--> 402                             return _repr_pprint(obj, self, cycle)
    403 
    404             return _default_pprint(obj, self, cycle)

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/IPython/lib/pretty.py in _repr_pprint(obj, p, cycle)
    695     """A pprint that just redirects to the normal repr function."""
    696     # Find newlines and replace them with p.break_()
--> 697     output = repr(obj)
    698     for idx,output_line in enumerate(output.splitlines()):
    699         if idx:

~/software_builds/modin/modin/pandas/dataframe.py in __repr__(self)
    123         num_cols = 30
    124 
--> 125         result = repr(self._build_repr_df(num_rows, num_cols))
    126         if len(self.index) > num_rows or len(self.columns) > num_cols:
    127             # The split here is so that we don't repr pandas row lengths.

~/software_builds/modin/modin/pandas/dataframe.py in _build_repr_df(self, num_rows, num_cols)
     94 
     95         if len(self.columns) <= num_cols:
---> 96             head_front = head.to_pandas()
     97             # Creating these empty to make the concat logic simpler
     98             head_back = pandas.DataFrame()

~/software_builds/modin/modin/data_management/query_compiler/pandas_query_compiler.py in to_pandas(self)
   2059         else:
   2060             ErrorMessage.catch_bugs_and_request_email(
-> 2061                 len(df.index) != len(self.index) or len(df.columns) != len(self.columns)
   2062             )
   2063             df.index = self.index

~/software_builds/modin/modin/error_message.py in catch_bugs_and_request_email(cls, failure_condition)
     25         if failure_condition:
     26             raise Exception(
---> 27                 "Internal Error. "
     28                 "Please email bugs@modin.org with the traceback and command that "
     29                 "caused this error."

Exception: Internal Error. Please email bugs@modin.org with the traceback and command that caused this error.
```
<!-- Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem. -->



Discussion:

Resolving patch:
diff --git a/modin/data_management/query_compiler/pandas_query_compiler.py b/modin/data_management/query_compiler/pandas_query_compiler.py
--- a/modin/data_management/query_compiler/pandas_query_compiler.py
+++ b/modin/data_management/query_compiler/pandas_query_compiler.py
@@ -1533,9 +1533,9 @@ def describe(self, **kwargs):
             numeric = True
             exclude = kwargs.get("exclude", None)
             if is_list_like(exclude):
-                exclude.append([np.timedelta64, np.datetime64])
+                exclude.append([np.timedelta64, np.datetime64, np.object, np.bool])
             else:
-                exclude = [exclude, np.timedelta64, np.datetime64]
+                exclude = [exclude, np.timedelta64, np.datetime64, np.object, np.bool]
             kwargs["exclude"] = exclude
         else:
             numeric = False


Test patch: