class_docstr: Data processing class for GCN models which use implicit feedback.
  
  Initialize train and test set, create normalized adjacency matrix and sample data for training epochs.
docstr: Process the dataset to reindex userID and itemID and only keep records with ratings greater than 0.
  
  Args:
      train (pandas.DataFrame): Training data with at least columns (col_user, col_item, col_rating).
      test (pandas.DataFrame): Test data with at least columns (col_user, col_item, col_rating).
          test can be None, if so, we only process the training data.
  
  Returns:
      list: train and test pandas.DataFrame Dataset, which have been reindexed and filtered.
docstr_tok: ["Process","the","dataset","to","reindex","userID","and","itemID","and","only","keep","records","with","ratings","greater","than","0",".","Args",":","train","(","pandas.DataFrame",")",":","Training","data","with","at","least","columns","(","col_user",",","col_item",",","col_rating",")",".","test","(","pandas.DataFrame",")",":","Test","data","with","at","least","columns","(","col_user",",","col_item",",","col_rating",")",".","test","can","be","None",",","if","so",",","we","only","process","the","training","data",".","Returns",":","list",":","train","and","test","pandas.DataFrame","Dataset",",","which","have","been","reindexed","and","filtered","."]
code: def _data_processing(self, train, test):
      """Process the dataset to reindex userID and itemID and only keep records with ratings greater than 0.
  
      Args:
          train (pandas.DataFrame): Training data with at least columns (col_user, col_item, col_rating).
          test (pandas.DataFrame): Test data with at least columns (col_user, col_item, col_rating).
              test can be None, if so, we only process the training data.
  
      Returns:
          list: train and test pandas.DataFrame Dataset, which have been reindexed and filtered.
  
      """
      df = (
          train
          if test is None
          else pd.concat([train, test], axis=0, ignore_index=True)
      )
  
      if self.user_idx is None:
          user_idx = df[[self.col_user]].drop_duplicates().reindex()
          user_idx[self.col_user + "_idx"] = np.arange(len(user_idx))
          self.n_users = len(user_idx)
          self.user_idx = user_idx
  
          self.user2id = dict(
              zip(
                  user_idx[self.col_user],
                  user_idx[self.col_user + "_idx"],
              )
          )
          self.id2user = dict(
              zip(
                  user_idx[self.col_user + "_idx"],
                  user_idx[self.col_user],
              )
          )
  
      if self.item_idx is None:
          item_idx = df[[self.col_item]].drop_duplicates()
          item_idx[self.col_item + "_idx"] = np.arange(len(item_idx))
          self.n_items = len(item_idx)
          self.item_idx = item_idx
  
          self.item2id = dict(
              zip(
                  item_idx[self.col_item],
                  item_idx[self.col_item + "_idx"],
              )
          )
          self.id2item = dict(
              zip(
                  item_idx[self.col_item + "_idx"],
                  item_idx[self.col_item],
              )
          )
  
      return self._reindex(train), self._reindex(test)
  
file_path: recommenders/recommenders/models/deeprec/DataModel/ImplicitCF.py
imports: import random
  import numpy
  import pandas
  import scipy.sparse
  from recommenders.utils.constants import DEFAULT_ITEM_COL, DEFAULT_USER_COL, DEFAULT_RATING_COL, DEFAULT_PREDICTION_COL
label_desc: Use image node_id 2 for calling the ImplicitCF obj's underlying member method code with example usage: obj._data_processing(train, test) and returns: self,  self