I want a Python library which can implement the apriori algorithm, and is compatible with pandas data frames.

The data is binarized, which mean a 1 for an item, if it is included in a transaction, and 0 if it is not. So, a T x n dataframe.

T <-- number of transactions
n <-- number of possible items

Preferably open-source. (The Python version doesn't matter.)


apyori implements this but not specifically for Pandas dataframes. Adapting it to use them should be simple.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.