{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# Importing Necessary Libraries\nimport numpy as np \nimport pandas as pd \nimport matplotlib.pyplot as plt\nimport seaborn as sns","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-03-24T16:58:10.288489Z","iopub.execute_input":"2022-03-24T16:58:10.28898Z","iopub.status.idle":"2022-03-24T16:58:11.419919Z","shell.execute_reply.started":"2022-03-24T16:58:10.288867Z","shell.execute_reply":"2022-03-24T16:58:11.418997Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Reading all necessary files\ntrain=pd.read_csv('../input/h-and-m-personalized-fashion-recommendations/transactions_train.csv')\narticles=pd.read_csv('../input/h-and-m-personalized-fashion-recommendations/articles.csv')\ncustomers=pd.read_csv('../input/h-and-m-personalized-fashion-recommendations/customers.csv')","metadata":{"execution":{"iopub.status.busy":"2022-03-24T16:58:11.422041Z","iopub.execute_input":"2022-03-24T16:58:11.422384Z","iopub.status.idle":"2022-03-24T16:59:22.698867Z","shell.execute_reply.started":"2022-03-24T16:58:11.422344Z","shell.execute_reply":"2022-03-24T16:59:22.697495Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"articles.describe()","metadata":{"execution":{"iopub.status.busy":"2022-03-24T16:59:22.701412Z","iopub.execute_input":"2022-03-24T16:59:22.701785Z","iopub.status.idle":"2022-03-24T16:59:22.809779Z","shell.execute_reply.started":"2022-03-24T16:59:22.701743Z","shell.execute_reply":"2022-03-24T16:59:22.808826Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"articles.head()","metadata":{"execution":{"iopub.status.busy":"2022-03-24T16:59:22.811272Z","iopub.execute_input":"2022-03-24T16:59:22.81164Z","iopub.status.idle":"2022-03-24T16:59:22.83754Z","shell.execute_reply.started":"2022-03-24T16:59:22.811597Z","shell.execute_reply":"2022-03-24T16:59:22.836462Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"customers.head()","metadata":{"execution":{"iopub.status.busy":"2022-03-24T16:59:22.840633Z","iopub.execute_input":"2022-03-24T16:59:22.841029Z","iopub.status.idle":"2022-03-24T16:59:22.8579Z","shell.execute_reply.started":"2022-03-24T16:59:22.840983Z","shell.execute_reply":"2022-03-24T16:59:22.856944Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"articles.value_counts(['product_type_name'])","metadata":{"execution":{"iopub.status.busy":"2022-03-24T16:59:22.859173Z","iopub.execute_input":"2022-03-24T16:59:22.859436Z","iopub.status.idle":"2022-03-24T16:59:22.888902Z","shell.execute_reply.started":"2022-03-24T16:59:22.859401Z","shell.execute_reply":"2022-03-24T16:59:22.88809Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"articles.value_counts('product_group_name')","metadata":{"execution":{"iopub.status.busy":"2022-03-24T16:59:22.890027Z","iopub.execute_input":"2022-03-24T16:59:22.890623Z","iopub.status.idle":"2022-03-24T16:59:22.906561Z","shell.execute_reply.started":"2022-03-24T16:59:22.890587Z","shell.execute_reply":"2022-03-24T16:59:22.90579Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"articles.value_counts('index_name')","metadata":{"execution":{"iopub.status.busy":"2022-03-24T16:59:22.908263Z","iopub.execute_input":"2022-03-24T16:59:22.908565Z","iopub.status.idle":"2022-03-24T16:59:22.926641Z","shell.execute_reply.started":"2022-03-24T16:59:22.908536Z","shell.execute_reply":"2022-03-24T16:59:22.925703Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.countplot(x='index_name',data=articles)\nplt.xticks(rotation=90)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-03-24T16:59:22.928131Z","iopub.execute_input":"2022-03-24T16:59:22.928368Z","iopub.status.idle":"2022-03-24T16:59:23.256037Z","shell.execute_reply.started":"2022-03-24T16:59:22.928339Z","shell.execute_reply":"2022-03-24T16:59:23.255024Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**Exploring all possible data types**","metadata":{}},{"cell_type":"code","source":"articles.dtypes","metadata":{"execution":{"iopub.status.busy":"2022-03-24T16:59:23.257599Z","iopub.execute_input":"2022-03-24T16:59:23.257972Z","iopub.status.idle":"2022-03-24T16:59:23.266509Z","shell.execute_reply.started":"2022-03-24T16:59:23.257929Z","shell.execute_reply":"2022-03-24T16:59:23.265654Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**All possible product group names**","metadata":{}},{"cell_type":"code","source":"sns.countplot(x='product_group_name',data=articles)\nplt.xticks(rotation=90)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-03-24T16:59:23.267985Z","iopub.execute_input":"2022-03-24T16:59:23.268425Z","iopub.status.idle":"2022-03-24T16:59:23.608836Z","shell.execute_reply.started":"2022-03-24T16:59:23.26839Z","shell.execute_reply":"2022-03-24T16:59:23.607937Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.displot(x='product_type_no',y='article_id',data=articles,kind='kde')","metadata":{"execution":{"iopub.status.busy":"2022-03-24T16:59:23.609987Z","iopub.execute_input":"2022-03-24T16:59:23.610201Z","iopub.status.idle":"2022-03-24T17:00:56.707037Z","shell.execute_reply.started":"2022-03-24T16:59:23.610176Z","shell.execute_reply":"2022-03-24T17:00:56.705946Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"'''k=sns.catplot(x='product_group_name',y='article_id',data=articles,kind='violin',height=10)\nk.set_xticklabels(rotation=90)'''","metadata":{"execution":{"iopub.status.busy":"2022-03-24T17:00:56.708373Z","iopub.execute_input":"2022-03-24T17:00:56.70876Z","iopub.status.idle":"2022-03-24T17:00:56.715861Z","shell.execute_reply.started":"2022-03-24T17:00:56.708721Z","shell.execute_reply":"2022-03-24T17:00:56.714873Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#sns.regplot(x='graphical_appearance_no',y='article_id',data=articles)","metadata":{"execution":{"iopub.status.busy":"2022-03-24T17:00:56.718446Z","iopub.execute_input":"2022-03-24T17:00:56.719044Z","iopub.status.idle":"2022-03-24T17:00:56.73042Z","shell.execute_reply.started":"2022-03-24T17:00:56.719001Z","shell.execute_reply":"2022-03-24T17:00:56.729195Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#sns.pairplot(data=articles,vars=['article_id','product_code','product_type_no','graphical_appearance_no','colour_group_code','perceived_colour_value_id','perceived_colour_master_id','department_no','index_group_no','section_no','garment_group_no'],kind='kde',diag_kind='scatter')","metadata":{"execution":{"iopub.status.busy":"2022-03-24T17:00:56.732471Z","iopub.execute_input":"2022-03-24T17:00:56.73278Z","iopub.status.idle":"2022-03-24T17:00:56.744645Z","shell.execute_reply.started":"2022-03-24T17:00:56.732741Z","shell.execute_reply":"2022-03-24T17:00:56.743734Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.heatmap(data=articles[['product_type_no','colour_group_code']])","metadata":{"execution":{"iopub.status.busy":"2022-03-24T17:09:06.113397Z","iopub.execute_input":"2022-03-24T17:09:06.113941Z","iopub.status.idle":"2022-03-24T17:09:06.7414Z","shell.execute_reply.started":"2022-03-24T17:09:06.113895Z","shell.execute_reply":"2022-03-24T17:09:06.740775Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"g=sns.PairGrid(articles)\ng.map(sns.violinplot)","metadata":{"execution":{"iopub.status.busy":"2022-03-24T17:17:58.221385Z","iopub.execute_input":"2022-03-24T17:17:58.221719Z"},"trusted":true},"execution_count":null,"outputs":[]}]}