text_html_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

df = pd.read_csv('../input/market_data_02.csv')
df.columns

from mlxtend.frequent_patterns import apriori
from mlxtend.frequent_patterns import association_rules
hot_encoded_df = df.groupby(['nota_fiscal_id', 'descricao'])['descricao'].count().unstack().reset_index().fillna(0).set_index('nota_fiscal_id')
hot_encoded_df.head()