import pandas as pd
from apyori import apriori

data = pd.read_csv('Groceries.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_support=0.025, min_length=2, min_lift=1.1)  
results = list(rules)  

for item in results:
 if not 'nan' in str(item):
   print()
   print(item)
   print()
   print("-----------------------")
