class_docstr: RLRMC dataset implementation. Creates sparse data structures for RLRMC algorithm.
docstr: Process dataset to reindex userID and itemID
  
  Args:
      df (pandas.DataFrame): dataframe with at least columns (col_user, col_item, col_rating)
  
  Returns:
      list: train and validation pandas.DataFrame Dataset, which have been reindexed.
docstr_tok: ["Process","dataset","to","reindex","userID","and","itemID","Args",":","df","(","pandas.DataFrame",")",":","dataframe","with","at","least","columns","(","col_user",",","col_item",",","col_rating",")","Returns",":","list",":","train","and","validation","pandas.DataFrame","Dataset",",","which","have","been","reindexed","."]
code: def _reindex(self, df):
      """Process dataset to reindex userID and itemID
  
      Args:
          df (pandas.DataFrame): dataframe with at least columns (col_user, col_item, col_rating)
  
      Returns:
          list: train and validation pandas.DataFrame Dataset, which have been reindexed.
  
      """
  
      # If validation dataset is None
      if df is None:
          return None
  
      # Map user_idx and item_idx
      df = pd.merge(df, self.user_idx, on=self.col_user, how="left")
      df = pd.merge(df, self.item_idx, on=self.col_item, how="left")
  
      # Select relevant columns
      df_reindex = df[
          [
              self.col_user + "_idx",
              self.col_item + "_idx",
              self.col_rating,
          ]
      ]
      df_reindex.columns = [
          self.col_user,
          self.col_item,
          self.col_rating,
      ]
  
      return df_reindex
  
file_path: recommenders/recommenders/models/rlrmc/RLRMCdataset.py
imports: import numpy
  import pandas
  from scipy.sparse import csr_matrix
  from recommenders.utils.constants import DEFAULT_ITEM_COL, DEFAULT_USER_COL, DEFAULT_RATING_COL, DEFAULT_TIMESTAMP_COL
label_desc: Use image node_id 3 for calling the RLRMCdataset obj's underlying member method code with example usage: obj._reindex(df) and returns: df_reindex, None