Repository: modin-project/modin

Issue:
describe can inappropriately throw errors if include is set


### Describe the problem
<!-- Describe the problem clearly here. -->
Discovered after #362, the Ray backend (and other backends) will throw the following error when `include` is set and the partition contains no data of that type:

```
---------------------------------------------------------------------------
RayTaskError                              Traceback (most recent call last)
~/Downloads/kaggle5/kaggle5.py in <module>
     51 
     52 
---> 53 train_df.describe(include=['O'])
     54 
     55 # In[9]:

~/software_builds/modin/modin/pandas/dataframe.py in describe(self, percentiles, include, exclude)
   1093         return DataFrame(
   1094             query_compiler=self._query_compiler.describe(
-> 1095                 percentiles=percentiles, include=include, exclude=exclude
   1096             )
   1097         )

~/software_builds/modin/modin/data_management/query_compiler/pandas_query_compiler.py in describe(self, **kwargs)
   1601             func, 0, new_columns, False
   1602         )
-> 1603         new_index = self.compute_index(0, new_data, False)
   1604         if numeric:
   1605             new_dtypes = pandas.Series(

~/software_builds/modin/modin/data_management/query_compiler/pandas_query_compiler.py in compute_index(self, axis, data_object, compute_diff)
    136             axis=axis,
    137             index_func=lambda df: pandas_index_extraction(df, axis),
--> 138             old_blocks=old_blocks,
    139         )
    140         return index_obj[new_indices] if compute_diff else new_indices

~/software_builds/modin/modin/engines/base/block_partitions.py in get_indices(self, axis, index_func, old_blocks)
    514             new_indices = (
    515                 [idx.apply(func).get() for idx in self._partitions_cache.T[0]]
--> 516                 if len(self._partitions_cache.T)
    517                 else []
    518             )

~/software_builds/modin/modin/engines/base/block_partitions.py in <listcomp>(.0)
    513             # DO NOT CHANGE TO self.partitions under any circumstance.
    514             new_indices = (
--> 515                 [idx.apply(func).get() for idx in self._partitions_cache.T[0]]
    516                 if len(self._partitions_cache.T)
    517                 else []

~/software_builds/modin/modin/engines/ray/pandas_on_ray/remote_partition.py in get(self)
     26             return self.apply(lambda x: x).get()
     27 
---> 28         return ray.get(self.oid)
     29 
     30     def apply(self, func, **kwargs):

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ray/worker.py in get(object_ids, worker)
   2384                 # here.
   2385                 last_task_error_raise_time = time.time()
-> 2386                 raise value
   2387             return value
   2388 

RayTaskError: ray_worker:modin.engines.ray.pandas_on_ray.remote_partition.deploy_ray_func() (pid=17711, host=iMac.local)
ray.worker.RayTaskError: ray_worker:modin.engines.ray.pandas_on_ray.axis_partition.deploy_ray_axis_func() (pid=17712, host=iMac.local)
  File "/Users/DevinPetersohn/software_builds/modin/modin/engines/ray/pandas_on_ray/axis_partition.py", line 127, in deploy_ray_axis_func
    result = func(dataframe, **kwargs)
  File "/Users/DevinPetersohn/software_builds/modin/modin/data_management/query_compiler/pandas_query_compiler.py", line 163, in helper
    return pandas_func(df, **kwargs)
  File "/Users/DevinPetersohn/software_builds/modin/modin/data_management/query_compiler/pandas_query_compiler.py", line 1596, in describe_builder
    return pandas.DataFrame.describe(df, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas/core/generic.py", line 8585, in describe
    d = pd.concat(ldesc, join_axes=pd.Index([names]), axis=1)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas/core/reshape/concat.py", line 225, in concat
    copy=copy, sort=sort)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas/core/reshape/concat.py", line 259, in __init__
    raise ValueError('No objects to concatenate')
ValueError: No objects to concatenate
```

### Source code / logs
<!-- 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. -->
`df.describe(include="object")`

Some partitions are completely numeric data in this dataset.



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
@@ -1593,7 +1593,10 @@ def describe(self, **kwargs):
                 new_columns = self.columns
 
         def describe_builder(df, **kwargs):
-            return pandas.DataFrame.describe(df, **kwargs)
+            try:
+                return pandas.DataFrame.describe(df, **kwargs)
+            except ValueError:
+                return pandas.DataFrame(index=df.index)
 
         # Apply describe and update indices, columns, and dtypes
         func = self._prepare_method(describe_builder, **kwargs)


Test patch: