{"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 pandas as pd\nimport numpy as np\nimport os\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nfrom tqdm import tqdm","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:07:39.727833Z","iopub.execute_input":"2022-02-14T14:07:39.728195Z","iopub.status.idle":"2022-02-14T14:07:40.783215Z","shell.execute_reply.started":"2022-02-14T14:07:39.728101Z","shell.execute_reply":"2022-02-14T14:07:40.782368Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"articles = pd.read_csv('/kaggle/input/h-and-m-personalized-fashion-recommendations/articles.csv')\ntransactions = pd.read_csv('/kaggle/input/h-and-m-personalized-fashion-recommendations/transactions_train.csv')\ncustomer  = pd.read_csv('/kaggle/input/h-and-m-personalized-fashion-recommendations/customers.csv')","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:07:40.785322Z","iopub.execute_input":"2022-02-14T14:07:40.785654Z","iopub.status.idle":"2022-02-14T14:08:54.152007Z","shell.execute_reply.started":"2022-02-14T14:07:40.78561Z","shell.execute_reply":"2022-02-14T14:08:54.151124Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"articles['article_id'] = articles['article_id'].astype(str)\ntransactions['article_id'] = transactions['article_id'].astype(str)\narticles['article_id'] = articles['article_id'].apply(lambda x : x.zfill(10))\ntransactions['article_id'] = transactions['article_id'].apply(lambda x : x.zfill(10))","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:09:10.016015Z","iopub.execute_input":"2022-02-14T14:09:10.016304Z","iopub.status.idle":"2022-02-14T14:09:59.732016Z","shell.execute_reply.started":"2022-02-14T14:09:10.01627Z","shell.execute_reply":"2022-02-14T14:09:59.731101Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"customer.nunique()","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:10:02.626529Z","iopub.execute_input":"2022-02-14T14:10:02.626854Z","iopub.status.idle":"2022-02-14T14:10:04.310625Z","shell.execute_reply.started":"2022-02-14T14:10:02.626815Z","shell.execute_reply":"2022-02-14T14:10:04.309722Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"100*customer.isnull().sum()/customer.shape[0]","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:10:06.830386Z","iopub.execute_input":"2022-02-14T14:10:06.830644Z","iopub.status.idle":"2022-02-14T14:10:07.447101Z","shell.execute_reply.started":"2022-02-14T14:10:06.830615Z","shell.execute_reply":"2022-02-14T14:10:07.446039Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"100*customer['fashion_news_frequency'].value_counts()/customer.shape[0]","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:10:08.27277Z","iopub.execute_input":"2022-02-14T14:10:08.273446Z","iopub.status.idle":"2022-02-14T14:10:08.495846Z","shell.execute_reply.started":"2022-02-14T14:10:08.273391Z","shell.execute_reply":"2022-02-14T14:10:08.494863Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"100*customer['club_member_status'].value_counts()/customer.shape[0]","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:10:08.723581Z","iopub.execute_input":"2022-02-14T14:10:08.723842Z","iopub.status.idle":"2022-02-14T14:10:08.943518Z","shell.execute_reply.started":"2022-02-14T14:10:08.723814Z","shell.execute_reply":"2022-02-14T14:10:08.942171Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"customer.drop(labels = ['FN','Active','fashion_news_frequency'], inplace = True, axis =1)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:10:09.093618Z","iopub.execute_input":"2022-02-14T14:10:09.093927Z","iopub.status.idle":"2022-02-14T14:10:09.209369Z","shell.execute_reply.started":"2022-02-14T14:10:09.093872Z","shell.execute_reply":"2022-02-14T14:10:09.208459Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Looks Right Skewed\ncustomer['age'].hist()","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:10:09.47012Z","iopub.execute_input":"2022-02-14T14:10:09.470425Z","iopub.status.idle":"2022-02-14T14:10:09.725834Z","shell.execute_reply.started":"2022-02-14T14:10:09.470393Z","shell.execute_reply":"2022-02-14T14:10:09.724921Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"customer['age'] = customer['age'].fillna(customer['age'].median())","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:10:09.917788Z","iopub.execute_input":"2022-02-14T14:10:09.918072Z","iopub.status.idle":"2022-02-14T14:10:09.956244Z","shell.execute_reply.started":"2022-02-14T14:10:09.918043Z","shell.execute_reply":"2022-02-14T14:10:09.955462Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# imputing \n\ncustomer['club_member_status'] = customer['club_member_status'].fillna(customer['club_member_status'].mode().values[0])","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:10:10.31362Z","iopub.execute_input":"2022-02-14T14:10:10.314227Z","iopub.status.idle":"2022-02-14T14:10:10.704361Z","shell.execute_reply.started":"2022-02-14T14:10:10.314181Z","shell.execute_reply":"2022-02-14T14:10:10.703728Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def make_buckets(x):\n    if x >= 16 and x<=24:\n        return 'Youth'\n    elif x> 24 and x <= 40:\n        return 'Young Adults'\n    elif x>40 and x <= 64:\n        return 'Middle Age Adults'\n    elif x>64:\n        return 'Seniors'\n        ","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:10:11.037487Z","iopub.execute_input":"2022-02-14T14:10:11.037947Z","iopub.status.idle":"2022-02-14T14:10:11.044199Z","shell.execute_reply.started":"2022-02-14T14:10:11.037877Z","shell.execute_reply":"2022-02-14T14:10:11.043631Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"customer['age_bucket'] = customer['age'].apply(lambda x : make_buckets(x))","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:10:11.434518Z","iopub.execute_input":"2022-02-14T14:10:11.435257Z","iopub.status.idle":"2022-02-14T14:10:12.379655Z","shell.execute_reply.started":"2022-02-14T14:10:11.435218Z","shell.execute_reply":"2022-02-14T14:10:12.378927Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"transactions.drop(labels = ['sales_channel_id'], inplace = True, axis = 1)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:10:12.38099Z","iopub.execute_input":"2022-02-14T14:10:12.381224Z","iopub.status.idle":"2022-02-14T14:10:17.830239Z","shell.execute_reply.started":"2022-02-14T14:10:12.381196Z","shell.execute_reply":"2022-02-14T14:10:17.82956Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"merged_data1 = pd.merge(left = transactions, right = customer , how = 'left', on = 'customer_id')","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:10:22.363267Z","iopub.execute_input":"2022-02-14T14:10:22.364247Z","iopub.status.idle":"2022-02-14T14:10:46.199646Z","shell.execute_reply.started":"2022-02-14T14:10:22.364103Z","shell.execute_reply":"2022-02-14T14:10:46.198964Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\n# merged_data1.head()","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:10:46.200959Z","iopub.execute_input":"2022-02-14T14:10:46.201653Z","iopub.status.idle":"2022-02-14T14:10:46.205285Z","shell.execute_reply.started":"2022-02-14T14:10:46.20162Z","shell.execute_reply":"2022-02-14T14:10:46.204531Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# merged_data1.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:10:46.206419Z","iopub.execute_input":"2022-02-14T14:10:46.206677Z","iopub.status.idle":"2022-02-14T14:10:46.218338Z","shell.execute_reply.started":"2022-02-14T14:10:46.206648Z","shell.execute_reply":"2022-02-14T14:10:46.217419Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# del(customer)\ndel(transactions)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:10:51.012521Z","iopub.execute_input":"2022-02-14T14:10:51.013265Z","iopub.status.idle":"2022-02-14T14:10:51.490368Z","shell.execute_reply.started":"2022-02-14T14:10:51.013223Z","shell.execute_reply":"2022-02-14T14:10:51.489295Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# articles.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2022-02-14T13:34:51.761177Z","iopub.execute_input":"2022-02-14T13:34:51.761423Z","iopub.status.idle":"2022-02-14T13:34:51.772728Z","shell.execute_reply.started":"2022-02-14T13:34:51.761388Z","shell.execute_reply":"2022-02-14T13:34:51.772121Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# merged_data1.shape\n# import gc\n# gc.collect()","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:11:09.951285Z","iopub.execute_input":"2022-02-14T14:11:09.95156Z","iopub.status.idle":"2022-02-14T14:11:09.955656Z","shell.execute_reply.started":"2022-02-14T14:11:09.951531Z","shell.execute_reply":"2022-02-14T14:11:09.954632Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"MD2 = pd.merge(left = merged_data1, right = articles[['article_id','prod_name','index_group_name','graphical_appearance_name','index_name','section_name','garment_group_name']], on = 'article_id', how = 'left')","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:11:17.070852Z","iopub.execute_input":"2022-02-14T14:11:17.071284Z","iopub.status.idle":"2022-02-14T14:11:35.014801Z","shell.execute_reply.started":"2022-02-14T14:11:17.071254Z","shell.execute_reply":"2022-02-14T14:11:35.013953Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"MD2.shape","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:11:35.016474Z","iopub.execute_input":"2022-02-14T14:11:35.016708Z","iopub.status.idle":"2022-02-14T14:11:35.021235Z","shell.execute_reply.started":"2022-02-14T14:11:35.016679Z","shell.execute_reply":"2022-02-14T14:11:35.020676Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# MD2.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2022-02-14T13:35:01.793912Z","iopub.execute_input":"2022-02-14T13:35:01.794134Z","iopub.status.idle":"2022-02-14T13:35:01.808493Z","shell.execute_reply.started":"2022-02-14T13:35:01.794105Z","shell.execute_reply":"2022-02-14T13:35:01.807537Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"del(merged_data1)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:11:39.631182Z","iopub.execute_input":"2022-02-14T14:11:39.631491Z","iopub.status.idle":"2022-02-14T14:11:40.519169Z","shell.execute_reply.started":"2022-02-14T14:11:39.631447Z","shell.execute_reply":"2022-02-14T14:11:40.518232Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# MD2.head()","metadata":{"execution":{"iopub.status.busy":"2022-02-14T13:35:02.474955Z","iopub.execute_input":"2022-02-14T13:35:02.47521Z","iopub.status.idle":"2022-02-14T13:35:02.48615Z","shell.execute_reply.started":"2022-02-14T13:35:02.475159Z","shell.execute_reply":"2022-02-14T13:35:02.485446Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Sales and Spending Across Age groups","metadata":{"execution":{"iopub.status.busy":"2022-02-14T13:35:02.487153Z","iopub.execute_input":"2022-02-14T13:35:02.487639Z","iopub.status.idle":"2022-02-14T13:35:02.496173Z","shell.execute_reply.started":"2022-02-14T13:35:02.487606Z","shell.execute_reply":"2022-02-14T13:35:02.495548Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"Sales_age_group = MD2.groupby(['age_bucket'])['price'].sum().reset_index()","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:11:55.732657Z","iopub.execute_input":"2022-02-14T14:11:55.733304Z","iopub.status.idle":"2022-02-14T14:11:59.016014Z","shell.execute_reply.started":"2022-02-14T14:11:55.73326Z","shell.execute_reply":"2022-02-14T14:11:59.01512Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.barplot(x = 'age_bucket',\n            y = 'price',\n            data = Sales_age_group.sort_values(by = ['price'],ascending = False))\nplt.xticks(rotation=90)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:12:02.461844Z","iopub.execute_input":"2022-02-14T14:12:02.462142Z","iopub.status.idle":"2022-02-14T14:12:02.632909Z","shell.execute_reply.started":"2022-02-14T14:12:02.462114Z","shell.execute_reply":"2022-02-14T14:12:02.63198Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"transations_per_group = MD2['age_bucket'].value_counts().reset_index()\ntransations_per_group.columns  = ['age_bucket', 'orders']","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:12:05.816712Z","iopub.execute_input":"2022-02-14T14:12:05.817018Z","iopub.status.idle":"2022-02-14T14:12:09.387752Z","shell.execute_reply.started":"2022-02-14T14:12:05.816982Z","shell.execute_reply":"2022-02-14T14:12:09.386975Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.barplot(x = 'age_bucket',\n            y = 'orders',\n            data = transations_per_group)\nplt.xticks(rotation=90)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:12:14.401218Z","iopub.execute_input":"2022-02-14T14:12:14.402034Z","iopub.status.idle":"2022-02-14T14:12:14.61221Z","shell.execute_reply.started":"2022-02-14T14:12:14.401989Z","shell.execute_reply":"2022-02-14T14:12:14.611396Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Clearly Adults i.e age group between 24 and 64 spend more as they belong to earning class","metadata":{"execution":{"iopub.status.busy":"2022-02-14T13:35:06.456754Z","iopub.execute_input":"2022-02-14T13:35:06.456972Z","iopub.status.idle":"2022-02-14T13:35:06.461416Z","shell.execute_reply.started":"2022-02-14T13:35:06.456943Z","shell.execute_reply":"2022-02-14T13:35:06.46049Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Popular Products Categories","metadata":{}},{"cell_type":"code","source":"prod_name = MD2['prod_name'].value_counts().reset_index()\nprod_name.columns  = ['prod_name','orders']","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:12:24.305693Z","iopub.execute_input":"2022-02-14T14:12:24.306324Z","iopub.status.idle":"2022-02-14T14:12:28.696277Z","shell.execute_reply.started":"2022-02-14T14:12:24.306283Z","shell.execute_reply":"2022-02-14T14:12:28.695549Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.barplot(x = 'prod_name',\n            y = 'orders',\n            data = prod_name.head(10))\nplt.xticks(rotation=90)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:12:28.698766Z","iopub.execute_input":"2022-02-14T14:12:28.699032Z","iopub.status.idle":"2022-02-14T14:12:28.982714Z","shell.execute_reply.started":"2022-02-14T14:12:28.699001Z","shell.execute_reply":"2022-02-14T14:12:28.981852Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"index_group_name = MD2['index_group_name'].value_counts().reset_index()\nindex_group_name.columns  = ['index_group_name','orders']\n\n\nsns.barplot(x = 'index_group_name',\n            y = 'orders',\n            data = index_group_name.head(10))\nplt.xticks(rotation=90)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:12:28.98402Z","iopub.execute_input":"2022-02-14T14:12:28.984218Z","iopub.status.idle":"2022-02-14T14:12:33.837445Z","shell.execute_reply.started":"2022-02-14T14:12:28.984193Z","shell.execute_reply":"2022-02-14T14:12:33.836633Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Popular designs\ngraphical_appearance_name = MD2['graphical_appearance_name'].value_counts().reset_index()\ngraphical_appearance_name.columns  = ['graphical_appearance_name','orders']\n\n\nsns.barplot(x = 'graphical_appearance_name',\n            y = 'orders',\n            data = graphical_appearance_name.head(10))\nplt.xticks(rotation=90)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:12:33.838933Z","iopub.execute_input":"2022-02-14T14:12:33.839137Z","iopub.status.idle":"2022-02-14T14:12:38.758588Z","shell.execute_reply.started":"2022-02-14T14:12:33.839111Z","shell.execute_reply":"2022-02-14T14:12:38.757744Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\nindex_name = MD2['index_name'].value_counts().reset_index()\nindex_name.columns  = ['index_name','orders']\n\n\nsns.barplot(x = 'index_name',\n            y = 'orders',\n            data = index_name)\nplt.xticks(rotation=90)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:12:38.759795Z","iopub.execute_input":"2022-02-14T14:12:38.760141Z","iopub.status.idle":"2022-02-14T14:12:43.743562Z","shell.execute_reply.started":"2022-02-14T14:12:38.760099Z","shell.execute_reply":"2022-02-14T14:12:43.742553Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Popular Sections\n\nMD2['section_name'].value_counts()\n\n\nsection_name = MD2['section_name'].value_counts().reset_index()\nsection_name.columns  = ['section_name','orders']\n\n\nsns.barplot(x = 'section_name',\n            y = 'orders',\n            data = section_name.head(10))\nplt.xticks(rotation=90)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:12:43.745032Z","iopub.execute_input":"2022-02-14T14:12:43.745277Z","iopub.status.idle":"2022-02-14T14:12:53.371656Z","shell.execute_reply.started":"2022-02-14T14:12:43.74525Z","shell.execute_reply":"2022-02-14T14:12:53.370842Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Clearly H&M is more popular among female customers","metadata":{}},{"cell_type":"code","source":"garment_group_name = MD2['garment_group_name'].value_counts().reset_index()\ngarment_group_name.columns  = ['garment_group_name','orders']\n\n\nsns.barplot(x = 'garment_group_name',\n            y = 'orders',\n            data = garment_group_name.head(10))\nplt.xticks(rotation=90)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T13:35:26.292639Z","iopub.execute_input":"2022-02-14T13:35:26.293053Z","iopub.status.idle":"2022-02-14T13:35:30.761436Z","shell.execute_reply.started":"2022-02-14T13:35:26.293008Z","shell.execute_reply":"2022-02-14T13:35:30.759642Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Lets see Age Group preferences","metadata":{}},{"cell_type":"code","source":"Age_pref_sec = MD2.groupby(['age_bucket','section_name'])['article_id'].count().reset_index()\nAge_pref_sec.sort_values(by = ['age_bucket','article_id'], ascending = False, inplace = True)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:13:04.659565Z","iopub.execute_input":"2022-02-14T14:13:04.660259Z","iopub.status.idle":"2022-02-14T14:13:16.01467Z","shell.execute_reply.started":"2022-02-14T14:13:04.660204Z","shell.execute_reply":"2022-02-14T14:13:16.01384Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Top 4 Sections per user group\nAge_pref_sec.groupby(['age_bucket']).head(4).reset_index(drop=True)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:13:16.016292Z","iopub.execute_input":"2022-02-14T14:13:16.016541Z","iopub.status.idle":"2022-02-14T14:13:16.035131Z","shell.execute_reply.started":"2022-02-14T14:13:16.016512Z","shell.execute_reply":"2022-02-14T14:13:16.034299Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# We can clearly see 'Womens Everyday Collection' is popular among all age categories","metadata":{}},{"cell_type":"code","source":"# getting Customer Preferred Sections","metadata":{"execution":{"iopub.status.busy":"2022-02-14T13:35:36.415474Z","iopub.execute_input":"2022-02-14T13:35:36.416242Z","iopub.status.idle":"2022-02-14T13:35:36.420134Z","shell.execute_reply.started":"2022-02-14T13:35:36.416198Z","shell.execute_reply":"2022-02-14T13:35:36.419291Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cust_pref_sec = MD2.groupby(['customer_id','section_name'])['article_id'].count().reset_index()","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:13:37.93935Z","iopub.execute_input":"2022-02-14T14:13:37.939624Z","iopub.status.idle":"2022-02-14T14:14:04.437312Z","shell.execute_reply.started":"2022-02-14T14:13:37.939596Z","shell.execute_reply":"2022-02-14T14:14:04.436545Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# cust_pref_sec[cust_pref_sec['customer_id']=='00000dbacae5abe5e23885899a1fa44253a17956c6d1c3d25f88aa139fdfc657'].sort_values(by = ['article_id'], ascen)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T13:35:55.39012Z","iopub.execute_input":"2022-02-14T13:35:55.390512Z","iopub.status.idle":"2022-02-14T13:35:55.393936Z","shell.execute_reply.started":"2022-02-14T13:35:55.390475Z","shell.execute_reply":"2022-02-14T13:35:55.393297Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cust_pref_sec.sort_values(by =['customer_id','article_id'], ascending = False, inplace = True)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:08.668024Z","iopub.execute_input":"2022-02-14T14:14:08.668335Z","iopub.status.idle":"2022-02-14T14:14:16.154464Z","shell.execute_reply.started":"2022-02-14T14:14:08.668302Z","shell.execute_reply":"2022-02-14T14:14:16.153624Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cust_pref_sec.reset_index(drop=True, inplace = True)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:16.156119Z","iopub.execute_input":"2022-02-14T14:14:16.156377Z","iopub.status.idle":"2022-02-14T14:14:16.16157Z","shell.execute_reply.started":"2022-02-14T14:14:16.156346Z","shell.execute_reply":"2022-02-14T14:14:16.160754Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cust_no_sec = cust_pref_sec.groupby(['customer_id'])['section_name'].count().reset_index()","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:16.163013Z","iopub.execute_input":"2022-02-14T14:14:16.163303Z","iopub.status.idle":"2022-02-14T14:14:23.11929Z","shell.execute_reply.started":"2022-02-14T14:14:16.163258Z","shell.execute_reply":"2022-02-14T14:14:23.118488Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cust_no_sec.sort_values(by = 'section_name', inplace = True)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:23.120981Z","iopub.execute_input":"2022-02-14T14:14:23.12119Z","iopub.status.idle":"2022-02-14T14:14:23.427714Z","shell.execute_reply.started":"2022-02-14T14:14:23.121164Z","shell.execute_reply":"2022-02-14T14:14:23.426888Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"Customer_list_1 = cust_no_sec[cust_no_sec.section_name >2 ]['customer_id'].unique().tolist()","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:23.428917Z","iopub.execute_input":"2022-02-14T14:14:23.429118Z","iopub.status.idle":"2022-02-14T14:14:24.23134Z","shell.execute_reply.started":"2022-02-14T14:14:23.429093Z","shell.execute_reply":"2022-02-14T14:14:24.23035Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"Customer_list_2 = cust_no_sec[cust_no_sec.section_name <=2 ]['customer_id'].unique().tolist()","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:24.232566Z","iopub.execute_input":"2022-02-14T14:14:24.232814Z","iopub.status.idle":"2022-02-14T14:14:24.632434Z","shell.execute_reply.started":"2022-02-14T14:14:24.232782Z","shell.execute_reply":"2022-02-14T14:14:24.631656Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Recommendation Generation","metadata":{}},{"cell_type":"code","source":"# Recommend Customer_list_2 products based on their age_group preference\n# Recommend Customer_list_1 products based on their sections (Top3)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T13:36:06.962148Z","iopub.execute_input":"2022-02-14T13:36:06.962455Z","iopub.status.idle":"2022-02-14T13:36:06.967329Z","shell.execute_reply.started":"2022-02-14T13:36:06.962419Z","shell.execute_reply":"2022-02-14T13:36:06.966421Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cust_pref_sec_list1 = cust_pref_sec[cust_pref_sec['customer_id'].isin(Customer_list_1)].reset_index(drop=True)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:28.911462Z","iopub.execute_input":"2022-02-14T14:14:28.912197Z","iopub.status.idle":"2022-02-14T14:14:32.120251Z","shell.execute_reply.started":"2022-02-14T14:14:28.912145Z","shell.execute_reply":"2022-02-14T14:14:32.119428Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cust_pref_sec_list1 = cust_pref_sec_list1.groupby('customer_id').head(3)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:32.121734Z","iopub.execute_input":"2022-02-14T14:14:32.122165Z","iopub.status.idle":"2022-02-14T14:14:36.945985Z","shell.execute_reply.started":"2022-02-14T14:14:32.12213Z","shell.execute_reply":"2022-02-14T14:14:36.945197Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pop_art = MD2.groupby(['section_name','article_id'])['customer_id'].count().reset_index()","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:36.94735Z","iopub.execute_input":"2022-02-14T14:14:36.947746Z","iopub.status.idle":"2022-02-14T14:14:50.37487Z","shell.execute_reply.started":"2022-02-14T14:14:36.947703Z","shell.execute_reply":"2022-02-14T14:14:50.374152Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pop_art.sort_values(by = ['section_name','customer_id'], ascending = False, inplace = True)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:50.376575Z","iopub.execute_input":"2022-02-14T14:14:50.376941Z","iopub.status.idle":"2022-02-14T14:14:50.414947Z","shell.execute_reply.started":"2022-02-14T14:14:50.376911Z","shell.execute_reply":"2022-02-14T14:14:50.414025Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pop_art = pop_art.groupby('section_name').head(4).reset_index(drop=True)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:50.416505Z","iopub.execute_input":"2022-02-14T14:14:50.417359Z","iopub.status.idle":"2022-02-14T14:14:50.457177Z","shell.execute_reply.started":"2022-02-14T14:14:50.417299Z","shell.execute_reply":"2022-02-14T14:14:50.456297Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cust_pref_sec_list1","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:50.458577Z","iopub.execute_input":"2022-02-14T14:14:50.458907Z","iopub.status.idle":"2022-02-14T14:14:50.54131Z","shell.execute_reply.started":"2022-02-14T14:14:50.458851Z","shell.execute_reply":"2022-02-14T14:14:50.540493Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pop_art.drop(labels = 'customer_id', axis =1, inplace = True)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:50.54267Z","iopub.execute_input":"2022-02-14T14:14:50.542918Z","iopub.status.idle":"2022-02-14T14:14:50.552414Z","shell.execute_reply.started":"2022-02-14T14:14:50.542871Z","shell.execute_reply":"2022-02-14T14:14:50.551686Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"Age_pref_sec = Age_pref_sec.groupby(['age_bucket']).head(3).reset_index(drop=True)\nAge_pref_sec.reset_index(drop=True, inplace = True)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:50.553694Z","iopub.execute_input":"2022-02-14T14:14:50.55397Z","iopub.status.idle":"2022-02-14T14:14:50.565708Z","shell.execute_reply.started":"2022-02-14T14:14:50.553935Z","shell.execute_reply":"2022-02-14T14:14:50.564873Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"Age_pref_sec.drop(labels = 'article_id', axis =1, inplace = True)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:50.56705Z","iopub.execute_input":"2022-02-14T14:14:50.567479Z","iopub.status.idle":"2022-02-14T14:14:50.579016Z","shell.execute_reply.started":"2022-02-14T14:14:50.567449Z","shell.execute_reply":"2022-02-14T14:14:50.578113Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"Age_pref_sec","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:50.58199Z","iopub.execute_input":"2022-02-14T14:14:50.582252Z","iopub.status.idle":"2022-02-14T14:14:50.596634Z","shell.execute_reply.started":"2022-02-14T14:14:50.582222Z","shell.execute_reply":"2022-02-14T14:14:50.596037Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pop_art","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:50.597519Z","iopub.execute_input":"2022-02-14T14:14:50.597845Z","iopub.status.idle":"2022-02-14T14:14:50.614493Z","shell.execute_reply.started":"2022-02-14T14:14:50.597817Z","shell.execute_reply":"2022-02-14T14:14:50.61389Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pop_art_recom = []\nfor i in tqdm(pop_art.section_name.unique().tolist()):\n    \n    artcle = pop_art[pop_art.section_name == i]['article_id'].unique().tolist()\n    artcle = [str(i) for i in artcle]\n    \n    recommend = ' '.join(artcle)\n    \n    pop_art_recom.append({\"section_name\":i,\n                          \"recommend\": recommend\n                         })\n    \n    \n    \n    ","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:50.615585Z","iopub.execute_input":"2022-02-14T14:14:50.616133Z","iopub.status.idle":"2022-02-14T14:14:50.672543Z","shell.execute_reply.started":"2022-02-14T14:14:50.616098Z","shell.execute_reply":"2022-02-14T14:14:50.671739Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"recom_sec = pd.DataFrame(pop_art_recom)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:50.673659Z","iopub.execute_input":"2022-02-14T14:14:50.673965Z","iopub.status.idle":"2022-02-14T14:14:50.678385Z","shell.execute_reply.started":"2022-02-14T14:14:50.673931Z","shell.execute_reply":"2022-02-14T14:14:50.677796Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"recom_sec.head()","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:50.679663Z","iopub.execute_input":"2022-02-14T14:14:50.679871Z","iopub.status.idle":"2022-02-14T14:14:50.69646Z","shell.execute_reply.started":"2022-02-14T14:14:50.679846Z","shell.execute_reply":"2022-02-14T14:14:50.695621Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"age_recom = []\nfor i in Age_pref_sec.age_bucket.unique().tolist():\n    \n    section = Age_pref_sec[Age_pref_sec.age_bucket == i]['section_name'].unique().tolist()\n    \n    \n    rec2 = recom_sec[recom_sec.section_name.isin(section)]['recommend'].unique().tolist()\n    \n    rec3 = ' '.join(rec2)\n    \n    age_recom.append({\"age_bucket\":i,\n                          \"recommend\": rec3\n                         })\n    ","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:50.697876Z","iopub.execute_input":"2022-02-14T14:14:50.698268Z","iopub.status.idle":"2022-02-14T14:14:50.71162Z","shell.execute_reply.started":"2022-02-14T14:14:50.698224Z","shell.execute_reply":"2022-02-14T14:14:50.71096Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"age_recoom = pd.DataFrame(age_recom)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:50.712465Z","iopub.execute_input":"2022-02-14T14:14:50.712687Z","iopub.status.idle":"2022-02-14T14:14:50.72351Z","shell.execute_reply.started":"2022-02-14T14:14:50.712659Z","shell.execute_reply":"2022-02-14T14:14:50.722527Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"Submission = customer[['customer_id', 'age_bucket']]","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:50.724877Z","iopub.execute_input":"2022-02-14T14:14:50.725226Z","iopub.status.idle":"2022-02-14T14:14:50.973598Z","shell.execute_reply.started":"2022-02-14T14:14:50.725187Z","shell.execute_reply":"2022-02-14T14:14:50.972959Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"Submission.nunique()","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:50.974664Z","iopub.execute_input":"2022-02-14T14:14:50.975377Z","iopub.status.idle":"2022-02-14T14:14:51.782005Z","shell.execute_reply.started":"2022-02-14T14:14:50.975338Z","shell.execute_reply":"2022-02-14T14:14:51.781085Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cust_pref_sec_list1.drop(labels = ['article_id'],axis = 1, inplace = True)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:51.783183Z","iopub.execute_input":"2022-02-14T14:14:51.783418Z","iopub.status.idle":"2022-02-14T14:14:51.889575Z","shell.execute_reply.started":"2022-02-14T14:14:51.78339Z","shell.execute_reply":"2022-02-14T14:14:51.888654Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"recom_type1_merge = pd.merge(left = cust_pref_sec_list1, right = recom_sec, on = 'section_name', how = 'left')","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:51.891283Z","iopub.execute_input":"2022-02-14T14:14:51.891592Z","iopub.status.idle":"2022-02-14T14:14:52.374989Z","shell.execute_reply.started":"2022-02-14T14:14:51.891551Z","shell.execute_reply":"2022-02-14T14:14:52.374252Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"recom_type1_merge['prediction'] = recom_type1_merge.groupby(['customer_id'])['recommend'].transform(\n                                              lambda x: ' '.join(x))","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:14:52.37639Z","iopub.execute_input":"2022-02-14T14:14:52.3767Z","iopub.status.idle":"2022-02-14T14:16:32.980735Z","shell.execute_reply.started":"2022-02-14T14:14:52.376661Z","shell.execute_reply":"2022-02-14T14:16:32.979824Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"recom_type1_merge.drop_duplicates(subset = ['customer_id'], keep='first', inplace =True)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:16:32.981997Z","iopub.execute_input":"2022-02-14T14:16:32.982234Z","iopub.status.idle":"2022-02-14T14:16:34.521718Z","shell.execute_reply.started":"2022-02-14T14:16:32.982205Z","shell.execute_reply":"2022-02-14T14:16:34.520914Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"recom_type1_merge.drop(labels = ['section_name','recommend'], axis =1, inplace = True)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:16:34.522998Z","iopub.execute_input":"2022-02-14T14:16:34.523234Z","iopub.status.idle":"2022-02-14T14:16:34.600746Z","shell.execute_reply.started":"2022-02-14T14:16:34.523206Z","shell.execute_reply":"2022-02-14T14:16:34.600128Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"rec_merge2= Submission[~Submission.customer_id.isin(recom_type1_merge.customer_id.unique().tolist())]","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:16:34.601991Z","iopub.execute_input":"2022-02-14T14:16:34.602229Z","iopub.status.idle":"2022-02-14T14:16:36.5424Z","shell.execute_reply.started":"2022-02-14T14:16:34.6022Z","shell.execute_reply":"2022-02-14T14:16:36.541811Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"rec_merge2.reset_index(drop=True, inplace=True)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:16:36.543593Z","iopub.execute_input":"2022-02-14T14:16:36.544049Z","iopub.status.idle":"2022-02-14T14:16:36.547267Z","shell.execute_reply.started":"2022-02-14T14:16:36.544016Z","shell.execute_reply":"2022-02-14T14:16:36.546772Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"rec_merge2.head()","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:16:36.548537Z","iopub.execute_input":"2022-02-14T14:16:36.548779Z","iopub.status.idle":"2022-02-14T14:16:36.56778Z","shell.execute_reply.started":"2022-02-14T14:16:36.548753Z","shell.execute_reply":"2022-02-14T14:16:36.565957Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"age_recoom.head()","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:16:36.569198Z","iopub.execute_input":"2022-02-14T14:16:36.569828Z","iopub.status.idle":"2022-02-14T14:16:36.58497Z","shell.execute_reply.started":"2022-02-14T14:16:36.569786Z","shell.execute_reply":"2022-02-14T14:16:36.584085Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"rec_merge2 = pd.merge(left =rec_merge2, right = age_recoom, on = 'age_bucket', how ='left')","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:16:36.590046Z","iopub.execute_input":"2022-02-14T14:16:36.590542Z","iopub.status.idle":"2022-02-14T14:16:36.678743Z","shell.execute_reply.started":"2022-02-14T14:16:36.590505Z","shell.execute_reply":"2022-02-14T14:16:36.677793Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"rec_merge2.drop(labels = 'age_bucket', axis=1, inplace = True)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:16:36.680218Z","iopub.execute_input":"2022-02-14T14:16:36.680703Z","iopub.status.idle":"2022-02-14T14:16:36.749503Z","shell.execute_reply.started":"2022-02-14T14:16:36.68065Z","shell.execute_reply":"2022-02-14T14:16:36.748572Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"rec_merge2.rename(columns = {'recommend':'prediction'}, inplace = True)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:16:36.752765Z","iopub.execute_input":"2022-02-14T14:16:36.753312Z","iopub.status.idle":"2022-02-14T14:16:36.760631Z","shell.execute_reply.started":"2022-02-14T14:16:36.753272Z","shell.execute_reply":"2022-02-14T14:16:36.757984Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"rec_merge2.shape[0]+recom_type1_merge.shape[0]","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:16:36.763094Z","iopub.execute_input":"2022-02-14T14:16:36.763448Z","iopub.status.idle":"2022-02-14T14:16:36.773147Z","shell.execute_reply.started":"2022-02-14T14:16:36.763402Z","shell.execute_reply":"2022-02-14T14:16:36.772045Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"final_submission = pd.DataFrame()\nfinal_submission = final_submission.append([recom_type1_merge,rec_merge2])","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:16:36.774683Z","iopub.execute_input":"2022-02-14T14:16:36.775772Z","iopub.status.idle":"2022-02-14T14:16:36.861741Z","shell.execute_reply.started":"2022-02-14T14:16:36.775723Z","shell.execute_reply":"2022-02-14T14:16:36.860128Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"final_submission.reset_index(drop=True, inplace = True)","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:16:36.86559Z","iopub.execute_input":"2022-02-14T14:16:36.866443Z","iopub.status.idle":"2022-02-14T14:16:36.873176Z","shell.execute_reply.started":"2022-02-14T14:16:36.866391Z","shell.execute_reply":"2022-02-14T14:16:36.872367Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"final_submission.head(2)['prediction'][0]","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:16:36.875006Z","iopub.execute_input":"2022-02-14T14:16:36.87534Z","iopub.status.idle":"2022-02-14T14:16:36.891164Z","shell.execute_reply.started":"2022-02-14T14:16:36.875292Z","shell.execute_reply":"2022-02-14T14:16:36.889972Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"final_submission.head()","metadata":{"execution":{"iopub.status.busy":"2022-02-14T14:16:36.893026Z","iopub.execute_input":"2022-02-14T14:16:36.893585Z","iopub.status.idle":"2022-02-14T14:16:36.913408Z","shell.execute_reply.started":"2022-02-14T14:16:36.893541Z","shell.execute_reply":"2022-02-14T14:16:36.907315Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Upvote if u liked it!","metadata":{}},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}