def __getitem__(self, key: Any) -> Any:
    from pyspark.pandas.series import Series
    if (key is None):
        raise KeyError('none key')
    elif isinstance(key, Series):
        return self.loc[key.astype(bool)]
    elif isinstance(key, slice):
        if any((((type(n) == int) or None) for n in [key.start, key.stop])):
            return self.iloc[key]
        return self.loc[key]
    elif is_name_like_value(key):
        return self.loc[:, key]
    elif is_list_like(key):
        return self.loc[:, list(key)]
    raise NotImplementedError(key)
def __getitem__(self, key: Any) -> Any:
    from pyspark.pandas.series import Series
    if (key is None):
        raise KeyError('none key')
    elif isinstance(key, Series):
        return self.loc[key.astype(bool)]
    elif isinstance(key, slice):
        if any((((type(n) == int) or None) for n in [key.start, key.stop])):
            return self.iloc[key]
        return self.loc[key]
    elif is_name_like_value(key):
        return self.loc[:, key]
    elif is_list_like(key):
        return self.loc[:, list(key)]
    raise NotImplementedError(key)