Repository: modin-project/modin

Issue:
Expanding dimension for Series with np.newaxis throws TypeError 

### Describe the problem

Expanding dimension for Series with np.newaxis throws TypeError
<!-- Describe the problem clearly here. -->

### Source code / logs
```python

df["col1"][:,np.newaxis]

```

Error:
```
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
~/software_builds/modin/modin/pandas/series.py in _getitem(self, key)
    179             try:
--> 180                 if all(k in self.keys() for k in key):
    181                     result = self._query_compiler.getitem_row_array(

~/software_builds/modin/modin/pandas/series.py in <genexpr>(.0)
    179             try:
--> 180                 if all(k in self.keys() for k in key):
    181                     result = self._query_compiler.getitem_row_array(

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas/core/indexes/numeric.py in __contains__(self, key)
    175         """
--> 176         hash(key)
    177         try:

TypeError: unhashable type: 'slice'

During handling of the above exception, another exception occurred:

TypeError                                 Traceback (most recent call last)
<ipython-input-6-916ad668b12d> in <module>
----> 1 df_train['SalePrice'][:,np.newaxis]

~/software_builds/modin/modin/pandas/base.py in __getitem__(self, key)
   3177             return self._getitem_slice(indexer)
   3178         else:
-> 3179             return self._getitem(key)
   3180 
   3181     def _getitem_slice(self, key):

~/software_builds/modin/modin/pandas/series.py in _getitem(self, key)
    185                     result = self._query_compiler.getitem_row_array(key)
    186             except TypeError:
--> 187                 result = self._query_compiler.getitem_row_array(key)
    188         if reduce_dimension:
    189             return self._reduce_dimension(result)

~/software_builds/modin/modin/backends/pandas/query_compiler.py in getitem_row_array(self, key)
   2008         if self._is_transposed:
   2009             return self.transpose().getitem_column_array(key, numeric=True).transpose()
-> 2010         result = self.data.mask(row_indices=key)
   2011         # We can't just set the index to key here because there may be multiple
   2012         # instances of a key.

~/software_builds/modin/modin/engines/base/frame/partition_manager.py in mask(self, row_indices, col_indices)
    962         if row_indices is not None:
    963             row_partitions_list = self._get_dict_of_block_index(
--> 964                 1, row_indices, ordered=True
    965             )
    966         else:

~/software_builds/modin/modin/engines/base/frame/partition_manager.py in _get_dict_of_block_index(self, axis, indices, ordered)
    678             )
    679 
--> 680         partition_ids = np.digitize(indices, cumulative)
    681         # If the output order doesn't matter or if the indices are monotonically
    682         # increasing, the computation is significantly simpler and faster than doing

TypeError: Cannot cast array data from dtype('O') to dtype('float64') according to the rule 'safe'
```
<!-- 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/pandas/series.py b/modin/pandas/series.py
--- a/modin/pandas/series.py
+++ b/modin/pandas/series.py
@@ -168,6 +168,9 @@ def _getitem(self, key):
                     pandas.RangeIndex(len(self.index))[key]
                 )
             )
+        # TODO: More efficiently handle `tuple` case for `Series.__getitem__`
+        if isinstance(key, tuple):
+            return self._default_to_pandas(pandas.Series.__getitem__, key)
         else:
             if not is_list_like(key):
                 reduce_dimension = True


Test patch: