@deprecate_kwarg('take_last', 'keep', mapping={True: 'last',
                                                   False: 'first'})
    @Appender(_shared_docs['duplicated'] % _indexops_doc_kwargs)
    def duplicated(self, keep='first'):
        keys = com._values_from_object(com._ensure_object(self.values))
        duplicated = lib.duplicated(keys, keep=keep)
        try:
            return self._constructor(duplicated,
                                     index=self.index).__finalize__(self)
        except __HOLE__:
            return np.array(duplicated, dtype=bool)

    # ----------------------------------------------------------------------
    # abstracts
dataset/ETHPy150Open pydata/pandas/pandas/core/base.py/IndexOpsMixin.duplicated