# Buggy code
def squeeze(self, ndim=0, axis=None):
    to_squeeze = self.data.to_pandas()
    # This is the case for 1xN or Nx1 DF - Need to call squeeze
    if ndim == 1:
        if axis is None:
            axis = 0 if self.data.shape[1] > 1 else 1
        squeezed = pandas.Series(to_squeeze.squeeze(axis))
        scaler_axis = self.columns if axis else self.index
        non_scaler_axis = self.index if axis else self.columns
        squeezed.name = scaler_axis[0]
        squeezed.index = non_scaler_axis
        return squeezed
    # This is the case for a 1x1 DF - We don't need to squeeze
    else:
        return to_squeeze.values[0][0]


# Traceback (TypeError)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-7-f7a945237ab9> in <module>()
3     header=[0,1,2,3], index_col=0)
4 DF2.loc[1]
----> 5 DF2.loc[1, 'Presidents']

~/anaconda3/lib/python3.7/site-packages/modin/pandas/indexing.py in __getitem__(self, key)
232         row_lookup, col_lookup = self._compute_lookup(row_loc, col_loc)
233         ndim = self._expand_dim(row_lookup, col_lookup, ndim)
--> 234         result = super(_LocIndexer, self).__getitem__(row_lookup, col_lookup, ndim)
235         return result
236

~/anaconda3/lib/python3.7/site-packages/modin/pandas/indexing.py in __getitem__(self, row_lookup, col_lookup, ndim)
163             single_axis = 1 if self.col_scaler else 0
164             return SeriesView(
--> 165                 qc_view.squeeze(ndim=1, axis=single_axis),
166                 self.df,
167                 (row_lookup, col_lookup),

~/anaconda3/lib/python3.7/site-packages/modin/data_management/query_compiler/pandas_query_compiler.py in squeeze(self, ndim, axis)
2781             if axis is None:
2782                 axis = 0 if self.data.shape[1] > 1 else 1
-> 2783             squeezed = pandas.Series(to_squeeze.squeeze(axis))
2784             scaler_axis = self.columns if axis else self.index
2785             non_scaler_axis = self.index if axis else self.columns

~/anaconda3/lib/python3.7/site-packages/pandas/core/series.py in __init__(self, data, index, dtype, name, copy, fastpath)
260             else:
261                 data = sanitize_array(data, index, dtype, copy,
--> 262                                       raise_cast_failure=True)
263
264                 data = SingleBlockManager(data, index, fastpath=True)

~/anaconda3/lib/python3.7/site-packages/pandas/core/internals/construction.py in sanitize_array(data, index, dtype, copy, raise_cast_failure)
658             raise Exception('Data must be 1-dimensional')
659         else:
--> 660             subarr = com.asarray_tuplesafe(data, dtype=dtype)
661
662     # This is to prevent mixed-type Series getting all casted to

~/anaconda3/lib/python3.7/site-packages/pandas/core/common.py in asarray_tuplesafe(values, dtype)
238         # Avoid building an array of arrays:
239         # TODO: verify whether any path hits this except #18819 (invalid)
--> 240         values = [tuple(x) for x in values]
241         result = construct_1d_object_array_from_listlike(values)
242

~/anaconda3/lib/python3.7/site-packages/pandas/core/common.py in <listcomp>(.0)
238         # Avoid building an array of arrays:
239         # TODO: verify whether any path hits this except #18819 (invalid)
--> 240         values = [tuple(x) for x in values]
241         result = construct_1d_object_array_from_listlike(values)
242

TypeError: 'int' object is not iterable

# Fixed code
def squeeze(self, ndim=0, axis=None):
    to_squeeze = self.to_pandas()
    # This is the case for 1xN or Nx1 DF - Need to call squeeze
    if ndim == 1:
        if axis is None:
            axis = 0 if self.data.shape[1] > 1 else 1
        squeezed = pandas.Series(to_squeeze.squeeze())
        # In the case of `MultiIndex`, we already have the correct index and naming
        # because we are going from pandas above. This step is to correct the
        # `Series` to have the correct name and index.
        if not isinstance(squeezed.index, pandas.MultiIndex):
            scaler_axis = self.columns if axis else self.index
            non_scaler_axis = self.index if axis else self.columns
            squeezed.name = scaler_axis[0]
            squeezed.index = non_scaler_axis
        return squeezed
    # This is the case for a 1x1 DF - We don't need to squeeze
    else:
        return to_squeeze.values[0][0]