Python is often the choice for developers who need to apply data analysis in their work or mainly data scientists/data engineers whose tasks are more related deriving insight from the data.

One of Python’s greatest assets is its extensive set of libraries. Recently, I was working on very popular Data Mining algorithms (i.e: FP-Growth and Custom A-Priori). There was a situation I wanted to get comprehensive analysis report on results generated by these algorithms.

As a support lib for Data Science work introducing “doc-dff — Generate the diff data between two files”

doc-diff supports the following features:

Generate the following comparison reports

Compare two files and return following ‘dicts(prodCode, recommendation)’

Install

$ pip install doc-diff

Implementation

from doc_diff import Difffrom doc_diff import gen_comp_report

if __name__ == '__main__':

_\# Data file location_    a\_priori\_csv\_location = **"./data/a-priori.csv"**    pfp\_csv\_location = **"./data/pfp.csv"**

_# Process a-priori.csv data file_    a\_priori\_diff = Diff(a\_priori\_csv\_location)  
a\_priori\_diff.process\_file()

_# Process pfp.csv data file_    pfp\_diff = Diff(pfp\_csv\_location)  
pfp\_diff.process\_file()  
gen\_comp\_report(a\_priori\_diff, pfp\_diff)

I’m looking forward to open source all my supportive lib for Data Science/Data Engineering work. Let me know what you think about ‘doc-diff’ below in the comments and share your thoughts. If you want to share any new features/issues, feel free to open an issue in the GitHub repository.