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