class_docstr: Compiler for Duplication Orphan Check
  
  Param:
      package (str, Optional): component package name
      module (str, Optional): component module name
      class (str): component class name
  
  Attr:
      data (str): path to dataframe file
      duplication_rule (dict): a dict which represents the rule, of which there are following keys:
                              - keys (list of str): the list of columns that the duplication is checked on.
                                               Default is None and duplication is checking on all columns.
                              - to_file (str): the filepath that duplicate-removed dataframe dumps to.
                                               Default is None and no save back,
      orphan_rules (dict): a dict which represents the rule, of which there are following keys:
                              - rules: a list of dict object, which of each object is a rule and has following keys:
                                      - local_key (str): column name in current data frame
                                      - foreign_data (str): foreign file path
                                      - foreign_key (str): column name in the foreign file
                              - to_file (str): filepath to dump the orphan-droped data frame.
                                               Default is None and no save back.
  
  Example:
      "component": {
          "package": "xai",
          "module": "compiler",
          "class": "DuplicationOrphanCheck",
          "attr": {
            "data": "./student.csv",
            "duplication_rule": {
              "keys": [
                "STUDENT_ID"
              ],
              "to_file": "./data/drop_student.csv"
            },
            "orphan_rules": {
                "rules":[
                  {
                    "local_key": "STUDENT_ID",
                    "foreign_data": "./course.csv",
                    "foreign_key": "STUDENT_ID"
                  }
                ],
                "to_file": "./data/drop_student_2.csv"
            }
          }
        }
class_docstr_tok: ["Compiler","for","Duplication","Orphan","Check","Param",":","package","(","str",",","Optional",")",":","component","package","name","module","(","str",",","Optional",")",":","component","module","name","class","(","str",")",":","component","class","name","Attr",":","data","(","str",")",":","path","to","dataframe","file","duplication_rule","(","dict",")",":","a","dict","which","represents","the","rule",",","of","which","there","are","following","keys",":","-","keys","(","list","of","str",")",":","the","list","of","columns","that","the","duplication","is","checked","on",".","Default","is","None","and","duplication","is","checking","on","all","columns",".","-","to_file","(","str",")",":","the","filepath","that","duplicate-removed","dataframe","dumps","to",".","Default","is","None","and","no","save","back",",","orphan_rules","(","dict",")",":","a","dict","which","represents","the","rule",",","of","which","there","are","following","keys",":","-","rules",":","a","list","of","dict","object",",","which","of","each","object","is","a","rule","and","has","following","keys",":","-","local_key","(","str",")",":","column","name","in","current","data","frame","-","foreign_data","(","str",")",":","foreign","file","path","-","foreign_key","(","str",")",":","column","name","in","the","foreign","file","-","to_file","(","str",")",":","filepath","to","dump","the","orphan-droped","data","frame",".","Default","is","None","and","no","save","back",".","Example",":","``","component","''",":","{","``","package","''",":","``","xai","''",",","``","module","''",":","``","compiler","''",",","``","class","''",":","``","DuplicationOrphanCheck","''",",","``","attr","''",":","{","``","data","''",":","``",".\/student.csv","''",",","``","duplication_rule","''",":","{","``","keys","''",":","[","``","STUDENT_ID","''","]",",","``","to_file","''",":","``",".\/data\/drop_student.csv","''","}",",","``","orphan_rules","''",":","{","``","rules","''",":","[","{","``","local_key","''",":","``","STUDENT_ID","''",",","``","foreign_data","''",":","``",".\/course.csv","''",",","``","foreign_key","''",":","``","STUDENT_ID","''","}","]",",","``","to_file","''",":","``",".\/data\/drop_student_2.csv","''","}","}","}"]
docstr: Init
  
  Args:
      dictionary (dict): attribute to set
docstr_tok: ["Init","Args",":","dictionary","(","dict",")",":","attribute","to","set"]
code: def __init__(self, dictionary):
      """
      Init
  
      Args:
          dictionary (dict): attribute to set
      """
      super(DuplicationOrphanCheck, self).__init__(
          dictionary, schema=self.schema
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  from collections import defaultdict
  from copy import deepcopy
  from xai.compiler.base import Dict2Obj
  from xai.data.constants import DATATYPE
  from xai.data.exceptions import AnalyzerDataTypeNotSupported
  from xai.data.explorer import CategoricalDataAnalyzer, NumericDataAnalyzer, TextDataAnalyzer, DatetimeDataAnalyzer
  from xai.data.explorer import CategoricalStats, NumericalStats, TextStats, DatetimeStats
  from xai.data.validator.dataframe_validator import DataframeValidator
  from xai.formatter import Report
label_desc: Use image node_id 1 to create a new DuplicationOrphanCheck object from inherited base classes: Dict2Obj with example: obj = DuplicationOrphanCheck(dictionary)