import pandas as pd
from apyori import apriori

data = pd.read_csv('DiapersAndBeer.csv', header=None)

records = []
for i in range(0, len(data)):  
    records.append([str(data.values[i,j]) for j in range(0, len(data.columns))])

rules = apriori(records, min_length=2)  
results = list(rules)  

for item in results:
   print()
   print(item)
   print()
   print("-----------------------")
