text_html_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

df = pd.read_csv('../input/grocery-products-purchase-data/Grocery Products Purchase.csv')

df1 = df.melt(var_name='columns', value_name='index')

unique_values = pd.DataFrame(df1['index'].value_counts())

unique_values.index

values = unique_values.head(20)
plt.figure(figsize=(18, 6))
plt.title('Frequency barplot')
ax = sns.barplot(x=values.index, y=values['index'])
plt.xticks(rotation='vertical')
ax.bar_label(ax.containers[0])
plt.show()