{"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 # library import\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns","metadata":{"execution":{"iopub.status.busy":"2022-08-06T13:59:17.518385Z","iopub.execute_input":"2022-08-06T13:59:17.519035Z","iopub.status.idle":"2022-08-06T13:59:18.860900Z","shell.execute_reply.started":"2022-08-06T13:59:17.518907Z","shell.execute_reply":"2022-08-06T13:59:18.859592Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df = pd.read_csv('../input/tabular-playground-series-aug-2022/train.csv')","metadata":{"execution":{"iopub.status.busy":"2022-08-06T13:59:27.285804Z","iopub.execute_input":"2022-08-06T13:59:27.286233Z","iopub.status.idle":"2022-08-06T13:59:27.391989Z","shell.execute_reply.started":"2022-08-06T13:59:27.286196Z","shell.execute_reply":"2022-08-06T13:59:27.390705Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.head(10)","metadata":{"execution":{"iopub.status.busy":"2022-08-06T13:59:27.596931Z","iopub.execute_input":"2022-08-06T13:59:27.598086Z","iopub.status.idle":"2022-08-06T13:59:27.642083Z","shell.execute_reply.started":"2022-08-06T13:59:27.598030Z","shell.execute_reply":"2022-08-06T13:59:27.641303Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.info()","metadata":{"scrolled":true,"execution":{"iopub.status.busy":"2022-08-06T13:59:27.966626Z","iopub.execute_input":"2022-08-06T13:59:27.967359Z","iopub.status.idle":"2022-08-06T13:59:27.998749Z","shell.execute_reply.started":"2022-08-06T13:59:27.967308Z","shell.execute_reply":"2022-08-06T13:59:27.997931Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.describe()","metadata":{"execution":{"iopub.status.busy":"2022-08-06T13:59:28.175233Z","iopub.execute_input":"2022-08-06T13:59:28.176875Z","iopub.status.idle":"2022-08-06T13:59:28.327019Z","shell.execute_reply.started":"2022-08-06T13:59:28.176809Z","shell.execute_reply":"2022-08-06T13:59:28.326192Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.isna().sum()","metadata":{"execution":{"iopub.status.busy":"2022-08-06T13:59:28.354809Z","iopub.execute_input":"2022-08-06T13:59:28.355214Z","iopub.status.idle":"2022-08-06T13:59:28.371559Z","shell.execute_reply.started":"2022-08-06T13:59:28.355180Z","shell.execute_reply":"2022-08-06T13:59:28.370387Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.isna().sum()","metadata":{"execution":{"iopub.status.busy":"2022-08-06T13:59:28.516485Z","iopub.execute_input":"2022-08-06T13:59:28.516888Z","iopub.status.idle":"2022-08-06T13:59:28.531955Z","shell.execute_reply.started":"2022-08-06T13:59:28.516851Z","shell.execute_reply":"2022-08-06T13:59:28.530415Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.product_code.value_counts()","metadata":{"execution":{"iopub.status.busy":"2022-08-06T13:59:28.678075Z","iopub.execute_input":"2022-08-06T13:59:28.679217Z","iopub.status.idle":"2022-08-06T13:59:28.690409Z","shell.execute_reply.started":"2022-08-06T13:59:28.679088Z","shell.execute_reply":"2022-08-06T13:59:28.689536Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.failure.value_counts()","metadata":{"execution":{"iopub.status.busy":"2022-08-06T13:59:28.873242Z","iopub.execute_input":"2022-08-06T13:59:28.874035Z","iopub.status.idle":"2022-08-06T13:59:28.883339Z","shell.execute_reply.started":"2022-08-06T13:59:28.873984Z","shell.execute_reply":"2022-08-06T13:59:28.882069Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig, axs = plt.subplots(3, 2, figsize=(18,18))\n\nsns.barplot(ax=axs[0,0],x= df.product_code, y= df.attribute_2)\naxs[0,0].set_title(\"product and attribute-2\")\n\nsns.barplot(ax=axs[0,1],x= df.product_code, y= df.attribute_3)\naxs[0,1].set_title(\"product and attribute-3\")\n\nsns.barplot(ax=axs[1,0], x=df.product_code, y=df.measurement_0)\naxs[1,0].set_title(\"product and measurment_0\")\n\nsns.barplot(ax=axs[1,1], x=df.product_code, y=df.measurement_1)\naxs[1,1].set_title(\"product and measurment_1\")\n\nsns.barplot(ax=axs[2,0], x=df.product_code, y=df.measurement_2)\naxs[2,0].set_title(\"product and measurment_2\")\n\nsns.barplot(ax=axs[2,1],x= df.product_code, y= df.loading)\naxs[2,1].set_title(\"product and attribute-1\")","metadata":{"execution":{"iopub.status.busy":"2022-08-06T13:59:29.101920Z","iopub.execute_input":"2022-08-06T13:59:29.102760Z","iopub.status.idle":"2022-08-06T13:59:32.669899Z","shell.execute_reply.started":"2022-08-06T13:59:29.102718Z","shell.execute_reply":"2022-08-06T13:59:32.669112Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(6,5))\n\nsns.histplot( x= df.product_code,  hue=df.failure)\n\nplt.title(\"Failure by product\")\n","metadata":{"execution":{"iopub.status.busy":"2022-08-06T13:59:32.671589Z","iopub.execute_input":"2022-08-06T13:59:32.672125Z","iopub.status.idle":"2022-08-06T13:59:32.947615Z","shell.execute_reply.started":"2022-08-06T13:59:32.672091Z","shell.execute_reply":"2022-08-06T13:59:32.946650Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(6,5))\n\nsns.histplot( x= df.attribute_0,  hue=df.failure)\n\nplt.title(\"Failure by attribute_0\")","metadata":{"execution":{"iopub.status.busy":"2022-08-06T13:59:32.949064Z","iopub.execute_input":"2022-08-06T13:59:32.950246Z","iopub.status.idle":"2022-08-06T13:59:33.215780Z","shell.execute_reply.started":"2022-08-06T13:59:32.950197Z","shell.execute_reply":"2022-08-06T13:59:33.214974Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(6,5))\n\nsns.histplot( x= df.attribute_1,  hue=df.failure)\n\nplt.title(\"Failure by attribute_0\")","metadata":{"execution":{"iopub.status.busy":"2022-08-06T13:59:33.217862Z","iopub.execute_input":"2022-08-06T13:59:33.218220Z","iopub.status.idle":"2022-08-06T13:59:33.440879Z","shell.execute_reply.started":"2022-08-06T13:59:33.218185Z","shell.execute_reply":"2022-08-06T13:59:33.439544Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(6,5))\n\nsns.kdeplot( x= df.attribute_2,  hue=df.failure, shade=True)\n\nplt.title(\"Failure by attribute_1\")","metadata":{"execution":{"iopub.status.busy":"2022-08-06T13:59:33.443440Z","iopub.execute_input":"2022-08-06T13:59:33.443889Z","iopub.status.idle":"2022-08-06T13:59:33.831348Z","shell.execute_reply.started":"2022-08-06T13:59:33.443843Z","shell.execute_reply":"2022-08-06T13:59:33.830174Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.attribute_2.value_counts() ","metadata":{"scrolled":true,"execution":{"iopub.status.busy":"2022-08-06T13:59:33.832984Z","iopub.execute_input":"2022-08-06T13:59:33.833691Z","iopub.status.idle":"2022-08-06T13:59:33.842765Z","shell.execute_reply.started":"2022-08-06T13:59:33.833629Z","shell.execute_reply":"2022-08-06T13:59:33.841601Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}