def drop_duplicates_sorted(df, subset=None, sep='', inplace=True):
    """
    Drop duplicate rows based on unique combination of values from
    given columns. Combinations will be sorted on row axis before
    dropping duplicates.

    Params
    ------
    df : pandas DataFrame

    subset : list of str
        Subset of columns to drop duplicates from.

    sep : str
        Separator string for columns when sorting row values.

    inplace : bool
        Whether to drop duplicates in place or to return a copy

    Returns
    -------
    df : pandas DataFrame with duplicates across columns in `subset` dropped.
    """
    if not inplace:
        df = df.copy()
    if subset is None:
        subset = df.columns
    df['check_string'] = df.apply(lambda row: sep.join(
        sorted([f"{row[c]}" for c in subset])), axis=1)
    df.drop_duplicates('check_string', inplace=True)
    df.drop('check_string', axis=1, inplace=True)
    return df