import pandas as pd

class Debug_csv():
    def __init__(self, output_path:str):
     

        self.output =  open(output_path, "w")
        # then the first row as header
        header = ["MovieURI","SubjectURI","RelationshipURI","ObjectURI","Abstract"]
        self.output.write(",".join(header) + "\n")

    def close(self):
        self.output.close()

    def write(self, RDF: pd.DataFrame):
        """
        Args:
            RDF (pd.DataFrame): ["MovieURI","SubjectURI","RelationshipURI","ObjectURI","Abstract"]
        """        

        RDF.to_csv(self.output, index=False, header=False)