{"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":"import numpy as np\nimport pandas as pd\nimport seaborn as sns\nimport math\nfrom matplotlib import pyplot as plt\nfrom tqdm.notebook import tqdm","metadata":{"_uuid":"051d70d956493feee0c6d64651c6a088724dca2a","_execution_state":"idle","execution":{"iopub.status.busy":"2022-04-28T22:23:15.011222Z","iopub.execute_input":"2022-04-28T22:23:15.012149Z","iopub.status.idle":"2022-04-28T22:23:15.016797Z","shell.execute_reply.started":"2022-04-28T22:23:15.012095Z","shell.execute_reply":"2022-04-28T22:23:15.016154Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**Get first 30% data for the analysis**","metadata":{}},{"cell_type":"code","source":"Articles = pd.read_csv(\"../input/h-and-m-personalized-fashion-recommendations/articles.csv\", usecols = [1])\nCustomers = pd.read_csv(\"../input/h-and-m-personalized-fashion-recommendations/customers.csv\", usecols = [1])\ntransaction_train = pd.read_csv(\"../input/h-and-m-personalized-fashion-recommendations/transactions_train.csv\", usecols = [1])\n\nArticles = pd.read_csv(\"../input/h-and-m-personalized-fashion-recommendations/articles.csv\", nrows = round(len(Articles)*.30))\nCustomers = pd.read_csv(\"../input/h-and-m-personalized-fashion-recommendations/customers.csv\", nrows = round(len(Customers)*.30))\ntransaction_train = pd.read_csv(\"../input/h-and-m-personalized-fashion-recommendations/transactions_train.csv\", nrows = round(len(transaction_train)*.30))","metadata":{"execution":{"iopub.status.busy":"2022-04-28T22:33:30.346268Z","iopub.execute_input":"2022-04-28T22:33:30.348433Z","iopub.status.idle":"2022-04-28T22:34:14.986710Z","shell.execute_reply.started":"2022-04-28T22:33:30.348371Z","shell.execute_reply":"2022-04-28T22:34:14.985822Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"> **Articles table contains all the details about the products. It contains product with many articles and their description like colour, appeareance, department etc..**","metadata":{}},{"cell_type":"code","source":"Articles.head()","metadata":{"execution":{"iopub.status.busy":"2022-04-28T22:35:57.810294Z","iopub.execute_input":"2022-04-28T22:35:57.811692Z","iopub.status.idle":"2022-04-28T22:35:57.848881Z","shell.execute_reply.started":"2022-04-28T22:35:57.811639Z","shell.execute_reply":"2022-04-28T22:35:57.847880Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"Articles['product_group_name'].unique()","metadata":{"execution":{"iopub.status.busy":"2022-04-28T22:56:18.976648Z","iopub.execute_input":"2022-04-28T22:56:18.976987Z","iopub.status.idle":"2022-04-28T22:56:18.985684Z","shell.execute_reply.started":"2022-04-28T22:56:18.976950Z","shell.execute_reply":"2022-04-28T22:56:18.985081Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"> **Large variety of articles in Ladieswear.**","metadata":{}},{"cell_type":"code","source":"ax = plt.subplots(figsize = (10,7))\nax = sns.histplot(data = Articles, y = 'index_group_name', color = 'Red')","metadata":{"execution":{"iopub.status.busy":"2022-04-28T23:10:38.444612Z","iopub.execute_input":"2022-04-28T23:10:38.444940Z","iopub.status.idle":"2022-04-28T23:10:38.668637Z","shell.execute_reply.started":"2022-04-28T23:10:38.444905Z","shell.execute_reply":"2022-04-28T23:10:38.667830Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"f, ax = plt.subplots(figsize = (15,7))\nax = sns.histplot(data = Articles, y = 'index_name', color = 'Red')","metadata":{"execution":{"iopub.status.busy":"2022-04-28T23:14:04.743995Z","iopub.execute_input":"2022-04-28T23:14:04.744849Z","iopub.status.idle":"2022-04-28T23:14:05.032061Z","shell.execute_reply.started":"2022-04-28T23:14:04.744777Z","shell.execute_reply":"2022-04-28T23:14:05.030997Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"> **Products are grouped by index. Upper body garment has most number of articles in ladies and children wear. In shirt garment group menswear have most articles**","metadata":{}},{"cell_type":"code","source":"f, ax = plt.subplots(figsize=(15, 7))\nax = sns.histplot(data=Articles, y='product_group_name', color='red', hue='index_group_name', multiple=\"stack\")\nax.set_xlabel('Count By Product Group')\nax.set_ylabel('Product Group')\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-04-28T23:37:57.209465Z","iopub.execute_input":"2022-04-28T23:37:57.209784Z","iopub.status.idle":"2022-04-28T23:37:57.728143Z","shell.execute_reply.started":"2022-04-28T23:37:57.209753Z","shell.execute_reply":"2022-04-28T23:37:57.726977Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"f, ax = plt.subplots(figsize = (15,7))\nax = sns.histplot(data = Articles, y = 'garment_group_name', color = 'r', hue = 'index_group_name', multiple = 'stack')","metadata":{"execution":{"iopub.status.busy":"2022-04-29T00:36:09.677862Z","iopub.execute_input":"2022-04-29T00:36:09.678669Z","iopub.status.idle":"2022-04-29T00:36:10.316623Z","shell.execute_reply.started":"2022-04-29T00:36:09.678614Z","shell.execute_reply":"2022-04-29T00:36:10.315620Z"},"trusted":true},"execution_count":null,"outputs":[]}]}