A transactional database represents a sparse and binary representation of items occurring in a dataframe. The steps to convert a dataframe into a transactional database is as follows:
from PAMI.extras.DF2DB import denseDF2DB as pro
import pandas as pd
# Objective: convert the above dataframe into a transactional database with items whose value is greater than or equal 1.
db = pro.denseDF2DB(inputDF=pd.DataFrame('mentionDataFrame'), thresholdValue=1, condition='>=')
# Convert and save the dataframe as a transactional database file
db.convert2TransactionalDatabase(outputFile='/home/userName/transactionalDB.txt')
# Getting the fileName of the transactional database
print('The output file is saved at ' + db.getFileName())