docstr: Return for each value in column a [of dataframe A] return the number of its occurrence in column b [of dataframe B]
  
  Args:
      df_a: dataframe A
      df_b: dataframe B
      col_a: column name a
      col_b: column name b
  
  Returns:
      A list of number indicates occurrences
docstr_tok: ["Return","for","each","value","in","column","a","[","of","dataframe","A","]","return","the","number","of","its","occurrence","in","column","b","[","of","dataframe","B","]","Args",":","df_a",":","dataframe","A","df_b",":","dataframe","B","col_a",":","column","name","a","col_b",":","column","name","b","Returns",":","A","list","of","number","indicates","occurrences"]
code: def unidirectional_matches(
      cls,
      df_a: pd.DataFrame,
      df_b: pd.DataFrame,
      col_a: str,
      col_b: str,
  ) -> List[int]:
      """
      Return for each value in column a [of dataframe A] return the number of its occurrence in column b [of dataframe B]
  
      Args:
          df_a: dataframe A
          df_b: dataframe B
          col_a: column name a
          col_b: column name b
  
      Returns:
          A list of number indicates occurrences
      """
      if col_a not in df_a.columns:
          raise ColumnNotFound(col_a, df_a.columns)
      if col_b not in df_b.columns:
          raise ColumnNotFound(col_b, df_b.columns)
  
      counter_b = Counter(df_b[col_b].values)
      occurrences_count = []
      for value in df_a[col_a].values:
          if value not in counter_b.keys():
              occurrences_count.append(0)
          else:
              occurrences_count.append(counter_b[value])
      return occurrences_count
  
file_path: contextual-ai/xai/data/validator/dataframe_validator.py
imports: import operator
  from collections import Counter
  from typing import List, Tuple
  import pandas
  from xai.data.exceptions import ColumnNotFound
label_desc: Use image node_id 3 for calling the DataframeValidator obj's underlying member method code with example usage: obj.unidirectional_matches(cls, df_a, df_b, col_a, col_b) and returns: occurrences_count