text_html_output_2.png
import pandas as pd

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

import plotly.express as px

articles = pd.read_csv('/kaggle/input/h-and-m-personalized-fashion-recommendations/articles.csv')

fig = px.pie(articles, values='article_id', 
             title='Distribution by Index Group Name',
             names='index_group_name',
             color_discrete_sequence=px.colors.sequential.RdBu,
             hover_data=['index_group_name'],
             labels={'index_group_name':'Index Group Name'},
            height=450)
fig.show()

fig = px.histogram(articles, x='garment_group_name',color="index_group_name", 
                   title="Index Group Name per Garment Group Name",
                  color_discrete_sequence=px.colors.sequential.Agsunset,
                  height=600)
fig.show()

df1 = articles.groupby(['section_name']).count().reset_index()
fig = px.bar(df1, x=articles.groupby(['section_name']).size(), y='section_name', color='section_name', title='Distribution by Section Name', hover_data=['section_name'], text_auto='.2s', labels={'section_name': 'Section Name'}, orientation='h', color_discrete_sequence=px.colors.diverging.Temps, height=1000)
fig.update_traces(textfont_size=11, textangle=0, textposition='outside', cliponaxis=False)
fig.update_layout(xaxis_title='Count')
fig.show()