the output of this code snippet consists of the association rules dataframe that we can use for our analysis you can play around with the item numberconsequentantecedentsupportand confidence values to generate different rules let' take some sample rules generated using transactions that explain of total salesmin-support of (required number of transactions >= and confidence greater than herewe have collected rules having maximum lift for each of the items that can be consequent (that appear on the right sideby using the following code (pruned_rules_df[['antecedent','consequent''support','confidence','lift']groupby('consequent'max(reset_index(sort_values(['lift''support','confidence']ascending=false)figure - association rules on the grocery dataset let' interpret the first rulewhich states thatyogurtwhole milk tropical fruit (rroot vegtablesthe pattern that the rule states in the equation is easy to understand--people who bought yogurtwhole milkand tropical fruit also tend to buy root vegetables let' try to understand the metrics support of the rule is which meansall the items together appear in transactions in the dataset confidence of the rule is %which means that of the time the antecedent items occurred we also had the consequent in the transaction ( of timescustomers who bought the left side items also bought root vegetablesanother important metric in figure - is lift lift means that the probability of finding root vegetables in the transactions which have yogurtwhole milkand tropical fruit is greater than the normal probability