code: def _create_unique_frame(
      df: pd.DataFrame, columns: List[Hashable], text_prefix: str = ""
  ) -> pd.DataFrame:
      """For given dataframe and columns create a dataframe with only unique combinations of the columns."""
      columns_data = []
      index_text = []
      group_unique_data: dict = df.groupby(columns, dropna=False).groups
      # The group data is backward (the columns are the indexes, and the indexes are the values)
      for duplicate_columns, indexes in group_unique_data.items():
          # Save info of duplicated text and the columns info
          columns_data.append(duplicate_columns)
          index_text.append(_get_dup_info(indexes, text_prefix))
  
      return pd.DataFrame(
          columns_data, index=index_text, columns=columns
      )
  
file_path: deepchecks/deepchecks/tabular/checks/train_test_validation/train_test_samples_mix.py
imports: from typing import Any, List
  import pandas
  from pandas.core.dtypes.common import is_integer_dtype
  from deepchecks.core import CheckResult
  from deepchecks.tabular import Context, TrainTestCheck
  from deepchecks.utils.abstracts.train_test_samples_mix import TrainTestSamplesMixAbstract
  from deepchecks.utils.strings import format_percent
  from deepchecks.utils.typing import Hashable
label_desc: Use image node_id 2 for calling a global function with example usage: _create_unique_frame(df, columns, text_prefix) and returns: pd