def drop_duplicates(self, subset: Optional[Union[(Name, List[Name])]]=None, keep: Union[(bool, str)]='first', inplace: bool=False) -> Optional['DataFrame']:
    "\n        Return DataFrame with duplicate rows removed, optionally only\n        considering certain columns.\n\n        Parameters\n        ----------\n        subset : column label or sequence of labels, optional\n            Only consider certain columns for identifying duplicates, by\n            default use all of the columns.\n        keep : {'first', 'last', False}, default 'first'\n            Determines which duplicates (if any) to keep.\n            - ``first`` : Drop duplicates except for the first occurrence.\n            - ``last`` : Drop duplicates except for the last occurrence.\n            - False : Drop all duplicates.\n        inplace : boolean, default False\n            Whether to drop duplicates in place or to return a copy.\n\n        Returns\n        -------\n        DataFrame\n            DataFrame with duplicates removed or None if ``inplace=True``.\n\n        >>> df = ps.DataFrame(\n        ...     {'a': [1, 2, 2, 2, 3], 'b': ['a', 'a', 'a', 'c', 'd']}, columns = ['a', 'b'])\n        >>> df\n           a  b\n        0  1  a\n        1  2  a\n        2  2  a\n        3  2  c\n        4  3  d\n\n        >>> df.drop_duplicates().sort_index()\n           a  b\n        0  1  a\n        1  2  a\n        3  2  c\n        4  3  d\n\n        >>> df.drop_duplicates('a').sort_index()\n           a  b\n        0  1  a\n        1  2  a\n        4  3  d\n\n        >>> df.drop_duplicates(['a', 'b']).sort_index()\n           a  b\n        0  1  a\n        1  2  a\n        3  2  c\n        4  3  d\n\n        >>> df.drop_duplicates(keep='last').sort_index()\n           a  b\n        0  1  a\n        2  2  a\n        3  2  c\n        4  3  d\n\n        >>> df.drop_duplicates(keep=False).sort_index()\n           a  b\n        0  1  a\n        3  2  c\n        4  3  d\n        "
    inplace = validate_bool_kwarg(inplace, 'inplace')
    (sdf, column) = self._mark_duplicates(subset, keep)
    sdf = sdf.where((~ scol_for(sdf, column))).drop(column)
    internal = self._internal.with_new_sdf(sdf)
    if inplace:
        self._update_internal_frame(internal)
        return None
    else:
        return DataFrame(internal)
Return DataFrame with duplicate rows removed, optionally only
considering certain columns.

Parameters
----------
subset : column label or sequence of labels, optional
    Only consider certain columns for identifying duplicates, by
    default use all of the columns.
keep : {'first', 'last', False}, default 'first'
    Determines which duplicates (if any) to keep.
    - ``first`` : Drop duplicates except for the first occurrence.
    - ``last`` : Drop duplicates except for the last occurrence.
    - False : Drop all duplicates.
inplace : boolean, default False
    Whether to drop duplicates in place or to return a copy.

Returns
-------
DataFrame
    DataFrame with duplicates removed or None if ``inplace=True``.

>>> df = ps.DataFrame(
...     {'a': [1, 2, 2, 2, 3], 'b': ['a', 'a', 'a', 'c', 'd']}, columns = ['a', 'b'])
>>> df
   a  b
0  1  a
1  2  a
2  2  a
3  2  c
4  3  d

>>> df.drop_duplicates().sort_index()
   a  b
0  1  a
1  2  a
3  2  c
4  3  d

>>> df.drop_duplicates('a').sort_index()
   a  b
0  1  a
1  2  a
4  3  d

>>> df.drop_duplicates(['a', 'b']).sort_index()
   a  b
0  1  a
1  2  a
3  2  c
4  3  d

>>> df.drop_duplicates(keep='last').sort_index()
   a  b
0  1  a
2  2  a
3  2  c
4  3  d

>>> df.drop_duplicates(keep=False).sort_index()
   a  b
0  1  a
3  2  c
4  3  d
def drop_duplicates(self, subset: Optional[Union[(Name, List[Name])]]=None, keep: Union[(bool, str)]='first', inplace: bool=False) -> Optional['DataFrame']:
    "\n        Return DataFrame with duplicate rows removed, optionally only\n        considering certain columns.\n\n        Parameters\n        ----------\n        subset : column label or sequence of labels, optional\n            Only consider certain columns for identifying duplicates, by\n            default use all of the columns.\n        keep : {'first', 'last', False}, default 'first'\n            Determines which duplicates (if any) to keep.\n            - ``first`` : Drop duplicates except for the first occurrence.\n            - ``last`` : Drop duplicates except for the last occurrence.\n            - False : Drop all duplicates.\n        inplace : boolean, default False\n            Whether to drop duplicates in place or to return a copy.\n\n        Returns\n        -------\n        DataFrame\n            DataFrame with duplicates removed or None if ``inplace=True``.\n\n        >>> df = ps.DataFrame(\n        ...     {'a': [1, 2, 2, 2, 3], 'b': ['a', 'a', 'a', 'c', 'd']}, columns = ['a', 'b'])\n        >>> df\n           a  b\n        0  1  a\n        1  2  a\n        2  2  a\n        3  2  c\n        4  3  d\n\n        >>> df.drop_duplicates().sort_index()\n           a  b\n        0  1  a\n        1  2  a\n        3  2  c\n        4  3  d\n\n        >>> df.drop_duplicates('a').sort_index()\n           a  b\n        0  1  a\n        1  2  a\n        4  3  d\n\n        >>> df.drop_duplicates(['a', 'b']).sort_index()\n           a  b\n        0  1  a\n        1  2  a\n        3  2  c\n        4  3  d\n\n        >>> df.drop_duplicates(keep='last').sort_index()\n           a  b\n        0  1  a\n        2  2  a\n        3  2  c\n        4  3  d\n\n        >>> df.drop_duplicates(keep=False).sort_index()\n           a  b\n        0  1  a\n        3  2  c\n        4  3  d\n        "
    inplace = validate_bool_kwarg(inplace, 'inplace')
    (sdf, column) = self._mark_duplicates(subset, keep)
    sdf = sdf.where((~ scol_for(sdf, column))).drop(column)
    internal = self._internal.with_new_sdf(sdf)
    if inplace:
        self._update_internal_frame(internal)
        return None
    else:
        return DataFrame(internal)