{"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":"markdown","source":"# Spaceship Titanic-Data Analysis","metadata":{}},{"cell_type":"markdown","source":"### Table of Contents : \n\n  * [Data Manipulation](#sec1)\n       * [Importing Dataset](#sec1.1)\n       * [Dataset View](#sec1.2)\n       * [Dataset Information](#sec1.3)\n       * [Summary Statistics](#sec1.4)\n       * [Checking for unique values in each attribute](#sec1.5)\n       * [Checking for missing values in each column](#sec1.6)\n       * [percentage of missing values in each column](#sec1.7)\n       \n  * [Data Visualization](#sec2)\n       * [Missing Value Plot](#sec2.1)\n       * [Box Plot of Continuous Variables](#sec2.2)\n       * [Heatmap](#sec2.3)\n       * [Here Each Attribute Visualised Individually](#sec2.4)\n           * [HomePlanet](#sec2.4.1)\n           * [Age](#sec2.4.2)\n           * [CryoSleep](#sec2.4.3)\n           * [Destination](#sec2.4.4)\n           * [VIP](#sec2.4.5)\n           * [RoomService](#sec2.4.6)\n           * [FoodCourt](#sec2.4.7)\n           * [ShoppingMall](#sec2.4.8)\n           * [Spa ](#sec2.4.9)\n           * [VRDeck](#sec2.4.10)\n           * [Transported](#sec2.4.11)\n           * [Cabin](#sec2.4.12)\n           * [Name](#sec2.4.13)","metadata":{}},{"cell_type":"markdown","source":"## Data Manipulation","metadata":{}},{"cell_type":"markdown","source":"## Importing Libraries ","metadata":{}},{"cell_type":"code","source":"import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport warnings\nwarnings.filterwarnings(\"ignore\")","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:49:18.875938Z","iopub.execute_input":"2022-07-06T20:49:18.876664Z","iopub.status.idle":"2022-07-06T20:49:19.906081Z","shell.execute_reply.started":"2022-07-06T20:49:18.876565Z","shell.execute_reply":"2022-07-06T20:49:19.904839Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pd.set_option('display.max_rows',100,'display.max_columns',100)","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:49:19.907938Z","iopub.execute_input":"2022-07-06T20:49:19.908285Z","iopub.status.idle":"2022-07-06T20:49:19.913394Z","shell.execute_reply.started":"2022-07-06T20:49:19.908251Z","shell.execute_reply":"2022-07-06T20:49:19.912368Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Importing Dataset <a class=\"anchor\" id=\"sec1.1\"></a>","metadata":{}},{"cell_type":"code","source":"df=pd.read_csv('../input/spaceship-titanic/train.csv')","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:49:19.914811Z","iopub.execute_input":"2022-07-06T20:49:19.915211Z","iopub.status.idle":"2022-07-06T20:49:19.976851Z","shell.execute_reply.started":"2022-07-06T20:49:19.915177Z","shell.execute_reply":"2022-07-06T20:49:19.975639Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Dataset View <a class=\"anchor\" id=\"sec1.2\"></a>","metadata":{}},{"cell_type":"code","source":"df.head()","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:49:19.980514Z","iopub.execute_input":"2022-07-06T20:49:19.980860Z","iopub.status.idle":"2022-07-06T20:49:20.009787Z","shell.execute_reply.started":"2022-07-06T20:49:19.980829Z","shell.execute_reply":"2022-07-06T20:49:20.008779Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Dataset Information <a class=\"anchor\" id=\"sec1.3\"></a>","metadata":{}},{"cell_type":"code","source":"df.info()","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:49:20.010949Z","iopub.execute_input":"2022-07-06T20:49:20.011260Z","iopub.status.idle":"2022-07-06T20:49:20.041427Z","shell.execute_reply.started":"2022-07-06T20:49:20.011230Z","shell.execute_reply":"2022-07-06T20:49:20.040653Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df=df.astype({'CryoSleep':'str','VIP':'str','Transported':'str'})","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:49:20.042670Z","iopub.execute_input":"2022-07-06T20:49:20.043172Z","iopub.status.idle":"2022-07-06T20:49:20.064827Z","shell.execute_reply.started":"2022-07-06T20:49:20.043141Z","shell.execute_reply":"2022-07-06T20:49:20.063874Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.info()","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:49:20.065895Z","iopub.execute_input":"2022-07-06T20:49:20.066612Z","iopub.status.idle":"2022-07-06T20:49:20.088445Z","shell.execute_reply.started":"2022-07-06T20:49:20.066579Z","shell.execute_reply":"2022-07-06T20:49:20.087603Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Summary Statistics <a class=\"anchor\" id=\"sec1.4\"></a>","metadata":{}},{"cell_type":"code","source":"df.describe()","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:49:20.089896Z","iopub.execute_input":"2022-07-06T20:49:20.090463Z","iopub.status.idle":"2022-07-06T20:49:20.127764Z","shell.execute_reply.started":"2022-07-06T20:49:20.090419Z","shell.execute_reply":"2022-07-06T20:49:20.126646Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Unique Values in each Column <a class=\"anchor\" id=\"sec1.5\"></a>","metadata":{}},{"cell_type":"code","source":"df.nunique()","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:49:20.129286Z","iopub.execute_input":"2022-07-06T20:49:20.129626Z","iopub.status.idle":"2022-07-06T20:49:20.152061Z","shell.execute_reply.started":"2022-07-06T20:49:20.129596Z","shell.execute_reply":"2022-07-06T20:49:20.151227Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Checking for missing values in each column <a class=\"anchor\" id=\"sec1.6\"></a>","metadata":{}},{"cell_type":"code","source":"df.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:49:20.155872Z","iopub.execute_input":"2022-07-06T20:49:20.156181Z","iopub.status.idle":"2022-07-06T20:49:20.173822Z","shell.execute_reply.started":"2022-07-06T20:49:20.156153Z","shell.execute_reply":"2022-07-06T20:49:20.172659Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Perecentage of missing values in each column  <a class=\"anchor\" id=\"sec1.7\"></a>","metadata":{}},{"cell_type":"code","source":"pd.options.display.float_format = '{:,.2f} %'.format\nprint((df.isnull().sum()/len(df))*100)\npd.options.display.float_format = '{:,.2f}'.format","metadata":{"scrolled":true,"execution":{"iopub.status.busy":"2022-07-06T20:49:20.175789Z","iopub.execute_input":"2022-07-06T20:49:20.176162Z","iopub.status.idle":"2022-07-06T20:49:20.193314Z","shell.execute_reply.started":"2022-07-06T20:49:20.176128Z","shell.execute_reply":"2022-07-06T20:49:20.192156Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Data Visualization  <a class=\"anchor\" id=\"sec2\"></a>","metadata":{}},{"cell_type":"markdown","source":"### Missing Value Plot  <a class=\"anchor\" id=\"sec2.1\"></a>","metadata":{}},{"cell_type":"code","source":"import missingno as msno","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:49:20.195605Z","iopub.execute_input":"2022-07-06T20:49:20.196445Z","iopub.status.idle":"2022-07-06T20:49:20.207080Z","shell.execute_reply.started":"2022-07-06T20:49:20.196399Z","shell.execute_reply":"2022-07-06T20:49:20.206016Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"msno.matrix(df,labels=[df.columns],figsize=(30,16),fontsize=18)## Visualize missing values as a matrix","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:49:20.208280Z","iopub.execute_input":"2022-07-06T20:49:20.208950Z","iopub.status.idle":"2022-07-06T20:49:21.029477Z","shell.execute_reply.started":"2022-07-06T20:49:20.208916Z","shell.execute_reply":"2022-07-06T20:49:21.028353Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Box Plot of Continuous Variable <a class=\"anchor\" id=\"sec2.2\"></a>","metadata":{}},{"cell_type":"code","source":"plt.figure(figsize=(18, 18))\nfor i, col in enumerate(df.select_dtypes(include=['float64']).columns):\n    plt.rcParams['axes.facecolor'] = 'black'\n    ax = plt.subplot(3,2, i+1)\n    sns.boxplot(data=df, x=col, ax=ax,color='red')\nplt.suptitle('Data distribution of continuous variables')\nplt.tight_layout()","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:49:21.030752Z","iopub.execute_input":"2022-07-06T20:49:21.031175Z","iopub.status.idle":"2022-07-06T20:49:21.772190Z","shell.execute_reply.started":"2022-07-06T20:49:21.031120Z","shell.execute_reply":"2022-07-06T20:49:21.771068Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Heatmap <a class=\"anchor\" id=\"sec2.3\"></a>","metadata":{}},{"cell_type":"code","source":"plt.figure(figsize=(8, 8))\nsns.heatmap(df.corr(),annot=True)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:49:21.773983Z","iopub.execute_input":"2022-07-06T20:49:21.774704Z","iopub.status.idle":"2022-07-06T20:49:22.349359Z","shell.execute_reply.started":"2022-07-06T20:49:21.774658Z","shell.execute_reply":"2022-07-06T20:49:22.347914Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Here Each Attribute Visualised Individually.<a class=\"anchor\" id=\"sec2.4\"></a>","metadata":{}},{"cell_type":"markdown","source":"###  HomePlanet <a class=\"anchor\" id=\"sec2.4.1\"></a>","metadata":{}},{"cell_type":"code","source":"print(df['HomePlanet'].unique())","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:49:22.351856Z","iopub.execute_input":"2022-07-06T20:49:22.353038Z","iopub.status.idle":"2022-07-06T20:49:22.362330Z","shell.execute_reply.started":"2022-07-06T20:49:22.352999Z","shell.execute_reply":"2022-07-06T20:49:22.361162Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(16, 12))\nplt.rcParams['axes.facecolor'] = 'black'\nax1 = plt.subplot(2,2,1)\nsns.histplot(data=df['HomePlanet'].dropna(),ax=ax1,color='pink')\nax1=plt.title('Histogram')\nax2 = plt.subplot(2,2,2)\nsns.swarmplot(x='HomePlanet',y='Age',data=df,ax=ax2)\nax2=plt.title('Swarmplot')\nax3 = plt.subplot(2,2,3)\nsns.histplot(df['HomePlanet'].dropna(),kde=True,ax=ax3)\nax3=plt.title('Density Plot')\nax4 = plt.subplot(2,2,4)\ndf.groupby(['HomePlanet']).count().plot(kind='pie',y='PassengerId',autopct='%1.0f%%',ax=ax4)\nax4=plt.xlabel('HomePlanet')\nax4=plt.title('Pie Chart')\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:49:22.363883Z","iopub.execute_input":"2022-07-06T20:49:22.364926Z","iopub.status.idle":"2022-07-06T20:50:19.204670Z","shell.execute_reply.started":"2022-07-06T20:49:22.364880Z","shell.execute_reply":"2022-07-06T20:50:19.202963Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Age<a class=\"anchor\" id=\"sec2.4.2\"></a>","metadata":{}},{"cell_type":"code","source":"plt.figure(figsize=(16, 12))\nplt.rcParams['axes.facecolor'] = 'black'\nax1 = plt.subplot(2,2,1)\nsns.swarmplot(x='Transported',y='Age',data=df,ax=ax1)\nax1=plt.title('Swarm Plot')\nax2 = plt.subplot(2,2,2)\nsns.regplot(x='Age',y='RoomService',data=df,ax=ax2)\nax2=plt.title('Regression Plot')\nax3 = plt.subplot(2,2,3)\nsns.distplot(df['Age'],kde=True,color='red',ax=ax3)\nax3=plt.title('Density Plot')\nax4 = plt.subplot(2,2,4)\nsns.boxplot(y='Age',data=df,ax=ax4,palette='pastel')\nax4=plt.title('Box Plot')\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:50:19.207321Z","iopub.execute_input":"2022-07-06T20:50:19.207784Z","iopub.status.idle":"2022-07-06T20:51:27.391744Z","shell.execute_reply.started":"2022-07-06T20:50:19.207743Z","shell.execute_reply":"2022-07-06T20:51:27.390940Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### CryoSleep <a class=\"anchor\" id=\"sec2.4.3\"></a>","metadata":{}},{"cell_type":"code","source":"print(df['CryoSleep'].unique())","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:51:27.392808Z","iopub.execute_input":"2022-07-06T20:51:27.393540Z","iopub.status.idle":"2022-07-06T20:51:27.400069Z","shell.execute_reply.started":"2022-07-06T20:51:27.393508Z","shell.execute_reply":"2022-07-06T20:51:27.398907Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(16, 12))\nplt.rcParams['axes.facecolor'] = 'black'\nax1 = plt.subplot(2,2,1)\nsns.histplot(data=df['CryoSleep'].dropna(),ax=ax1,color='pink')\nax1=plt.title('Histogram')\nax2 = plt.subplot(2,2,2)\nsns.swarmplot(x='CryoSleep',y='Age',data=df,ax=ax2)\nax2=plt.title('Swarmplot')\nax3 = plt.subplot(2,2,3)\nsns.histplot(df['CryoSleep'].dropna(),kde=True,ax=ax3)\nax3=plt.title('Density Plot')\nax4 = plt.subplot(2,2,4)\ndf.groupby(['CryoSleep']).count().plot(kind='pie',y='PassengerId',autopct='%1.0f%%',ax=ax4)\nax4=plt.xlabel('CryoSleep')\nax4=plt.title('Pie Chart')\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:51:27.401559Z","iopub.execute_input":"2022-07-06T20:51:27.402570Z","iopub.status.idle":"2022-07-06T20:52:40.817217Z","shell.execute_reply.started":"2022-07-06T20:51:27.402523Z","shell.execute_reply":"2022-07-06T20:52:40.815993Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Destination <a class=\"anchor\" id=\"sec2.4.4\"></a>","metadata":{}},{"cell_type":"code","source":"print(df['Destination'].unique())","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:52:40.818615Z","iopub.execute_input":"2022-07-06T20:52:40.818950Z","iopub.status.idle":"2022-07-06T20:52:40.826354Z","shell.execute_reply.started":"2022-07-06T20:52:40.818920Z","shell.execute_reply":"2022-07-06T20:52:40.825174Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(16, 12))\nplt.rcParams['axes.facecolor'] = 'black'\nax1 = plt.subplot(2,2,1)\nsns.histplot(data=df['Destination'].dropna(),ax=ax1,color='pink')\nax1=plt.title('Histogram')\nax2 = plt.subplot(2,2,2)\nsns.swarmplot(x='Destination',y='Age',data=df,ax=ax2)\nax2=plt.title('Swarmplot')\nax3 = plt.subplot(2,2,3)\nsns.histplot(df['Destination'].dropna(),kde=True,ax=ax3)\nax3=plt.title('Density Plot')\nax4 = plt.subplot(2,2,4)\ndf.groupby(['Destination']).count().plot(kind='pie',y='PassengerId',autopct='%1.0f%%',ax=ax4)\nax4=plt.xlabel('Destination')\nax4=plt.title('Pie Chart')\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:52:40.828116Z","iopub.execute_input":"2022-07-06T20:52:40.828677Z","iopub.status.idle":"2022-07-06T20:53:53.182074Z","shell.execute_reply.started":"2022-07-06T20:52:40.828633Z","shell.execute_reply":"2022-07-06T20:53:53.180984Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### VIP <a class=\"anchor\" id=\"sec2.4.5\"></a>","metadata":{}},{"cell_type":"code","source":"df['VIP'].unique()","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:53:53.183635Z","iopub.execute_input":"2022-07-06T20:53:53.184194Z","iopub.status.idle":"2022-07-06T20:53:53.192340Z","shell.execute_reply.started":"2022-07-06T20:53:53.184157Z","shell.execute_reply":"2022-07-06T20:53:53.191268Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(16, 12))\nplt.rcParams['axes.facecolor'] = 'black'\nax1 = plt.subplot(2,2,1)\nsns.histplot(data=df['VIP'].dropna(),ax=ax1,color='pink')\nax1=plt.title('Histogram')\nax2 = plt.subplot(2,2,2)\nsns.swarmplot(x='VIP',y='Age',data=df,ax=ax2)\nax2=plt.title('Swarmplot')\nax3 = plt.subplot(2,2,3)\nsns.histplot(df['VIP'].dropna(),kde=True,ax=ax3)\nax3=plt.title('Density Plot')\nax4 = plt.subplot(2,2,4)\ndf.groupby(['VIP']).count().plot(kind='pie',y='PassengerId',autopct='%1.0f%%',ax=ax4)\nax4=plt.xlabel('VIP')\nax4=plt.title('Pie Chart')\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:53:53.194022Z","iopub.execute_input":"2022-07-06T20:53:53.194446Z","iopub.status.idle":"2022-07-06T20:56:25.236352Z","shell.execute_reply.started":"2022-07-06T20:53:53.194404Z","shell.execute_reply":"2022-07-06T20:56:25.235221Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### RoomServive <a class=\"anchor\" id=\"sec2.4.6\"></a>","metadata":{}},{"cell_type":"code","source":"plt.figure(figsize=(16, 12))\nplt.rcParams['axes.facecolor'] = 'black'\nax1 = plt.subplot(2,2,1)\nsns.scatterplot(x='RoomService',y='Age',data=df,ax=ax1)\nax1=plt.title('Scatter Plot')\nax2 = plt.subplot(2,2,2)\nsns.regplot(x='RoomService',y='Age',data=df,ax=ax2)\nax2=plt.title('Regression Plot')\nax3 = plt.subplot(2,2,3)\nsns.distplot(df['RoomService'],kde=True,color='red',ax=ax3)\nax3=plt.title('Density Plot')\nax4 = plt.subplot(2,2,4)\nsns.boxplot(y='RoomService',data=df,ax=ax4,palette='pastel')\nax4=plt.title('Box Plot')\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:56:25.237886Z","iopub.execute_input":"2022-07-06T20:56:25.238217Z","iopub.status.idle":"2022-07-06T20:56:26.593317Z","shell.execute_reply.started":"2022-07-06T20:56:25.238187Z","shell.execute_reply":"2022-07-06T20:56:26.592107Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### FoodCourt <a class=\"anchor\" id=\"sec2.4.7\"></a>","metadata":{}},{"cell_type":"code","source":"plt.figure(figsize=(16, 12))\nplt.rcParams['axes.facecolor'] = 'black'\nax1 = plt.subplot(2,2,1)\nsns.scatterplot(x='FoodCourt',y='VRDeck',data=df,ax=ax1)\nax1=plt.title('Scatter Plot')\nax2 = plt.subplot(2,2,2)\nsns.regplot(x='FoodCourt',y='VRDeck',data=df,ax=ax2)\nax2=plt.title('Regression Plot')\nax3 = plt.subplot(2,2,3)\nsns.distplot(df['FoodCourt'],kde=True,color='red',ax=ax3)\nax3=plt.title('Density Plot')\nax4 = plt.subplot(2,2,4)\nsns.boxplot(y='FoodCourt',data=df,ax=ax4,palette='pastel')\nax4=plt.title('Box Plot')\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:56:26.595074Z","iopub.execute_input":"2022-07-06T20:56:26.595601Z","iopub.status.idle":"2022-07-06T20:56:27.807961Z","shell.execute_reply.started":"2022-07-06T20:56:26.595566Z","shell.execute_reply":"2022-07-06T20:56:27.807164Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### ShoppingMall <a class=\"anchor\" id=\"sec2.4.8\"></a>","metadata":{}},{"cell_type":"code","source":"plt.figure(figsize=(16, 12))\nplt.rcParams['axes.facecolor'] = 'black'\nax1 = plt.subplot(2,2,1)\nsns.scatterplot(x='ShoppingMall',y='Age',data=df,ax=ax1)\nax1=plt.title('Scatter Plot')\nax2 = plt.subplot(2,2,2)\nsns.regplot(x='ShoppingMall',y='Age',data=df,ax=ax2)\nax2=plt.title('Regression Plot')\nax3 = plt.subplot(2,2,3)\nsns.distplot(df['ShoppingMall'],kde=True,color='red',ax=ax3)\nax3=plt.title('Density Plot')\nax4 = plt.subplot(2,2,4)\nsns.boxplot(y='ShoppingMall',data=df,ax=ax4,palette='pastel')\nax4=plt.title('Box Plot')\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:56:27.809136Z","iopub.execute_input":"2022-07-06T20:56:27.810096Z","iopub.status.idle":"2022-07-06T20:56:29.196108Z","shell.execute_reply.started":"2022-07-06T20:56:27.810059Z","shell.execute_reply":"2022-07-06T20:56:29.194894Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Spa <a class=\"anchor\" id=\"sec2.4.9\"></a>","metadata":{}},{"cell_type":"code","source":"plt.figure(figsize=(16, 12))\nplt.rcParams['axes.facecolor'] = 'black'\nax1 = plt.subplot(2,2,1)\nsns.scatterplot(x='Spa',y='Age',data=df,ax=ax1)\nax1=plt.title('Scatter Plot')\nax2 = plt.subplot(2,2,2)\nsns.regplot(x='Spa',y='Age',data=df,ax=ax2)\nax2=plt.title('Regression Plot')\nax3 = plt.subplot(2,2,3)\nsns.distplot(df['Spa'],kde=True,color='red',ax=ax3)\nax3=plt.title('Density Plot')\nax4 = plt.subplot(2,2,4)\nsns.boxplot(y='Spa',data=df,ax=ax4,palette='pastel')\nax4=plt.title('Box Plot')\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:56:29.203319Z","iopub.execute_input":"2022-07-06T20:56:29.203698Z","iopub.status.idle":"2022-07-06T20:56:30.416521Z","shell.execute_reply.started":"2022-07-06T20:56:29.203664Z","shell.execute_reply":"2022-07-06T20:56:30.415372Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### VRDeck <a class=\"anchor\" id=\"sec2.4.10\"></a>","metadata":{}},{"cell_type":"code","source":"plt.figure(figsize=(16, 12))\nplt.rcParams['axes.facecolor'] = 'black'\nax1 = plt.subplot(2,2,1)\nsns.scatterplot(x='VRDeck',y='FoodCourt',data=df,ax=ax1)\nax1=plt.title('Scatter Plot')\nax2 = plt.subplot(2,2,2)\nsns.regplot(x='VRDeck',y='FoodCourt',data=df,ax=ax2)\nax2=plt.title('Regression Plot')\nax3 = plt.subplot(2,2,3)\nsns.distplot(df['VRDeck'],kde=True,color='red',ax=ax3)\nax3=plt.title('Density Plot')\nax4 = plt.subplot(2,2,4)\nsns.boxplot(y='VRDeck',data=df,ax=ax4,palette='pastel')\nax4=plt.title('Box Plot')\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:56:30.418385Z","iopub.execute_input":"2022-07-06T20:56:30.418816Z","iopub.status.idle":"2022-07-06T20:56:31.686252Z","shell.execute_reply.started":"2022-07-06T20:56:30.418773Z","shell.execute_reply":"2022-07-06T20:56:31.685464Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Transported <a class=\"anchor\" id=\"sec2.4.11\"></a>","metadata":{}},{"cell_type":"code","source":"print(df['Transported'].unique())","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:56:31.687410Z","iopub.execute_input":"2022-07-06T20:56:31.688627Z","iopub.status.idle":"2022-07-06T20:56:31.694265Z","shell.execute_reply.started":"2022-07-06T20:56:31.688591Z","shell.execute_reply":"2022-07-06T20:56:31.693475Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(16, 12))\nplt.rcParams['axes.facecolor'] = 'black'\nax1 = plt.subplot(2,2,1)\nsns.histplot(data=df['Transported'].dropna(),ax=ax1,color='pink')\nax1=plt.title('Histogram')\nax2 = plt.subplot(2,2,2)\nsns.swarmplot(x='Transported',y='Age',data=df,ax=ax2)\nax2=plt.title('Swarmplot')\nax3 = plt.subplot(2,2,3)\nsns.histplot(df['Transported'].dropna(),kde=True,ax=ax3)\nax3=plt.title('Density Plot')\nax4 = plt.subplot(2,2,4)\ndf.groupby(['Transported']).count().plot(kind='pie',y='PassengerId',autopct='%1.0f%%',ax=ax4)\nax4=plt.xlabel('Transported')\nax4=plt.title('Pie Chart')\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:56:31.695409Z","iopub.execute_input":"2022-07-06T20:56:31.695752Z","iopub.status.idle":"2022-07-06T20:57:39.009334Z","shell.execute_reply.started":"2022-07-06T20:56:31.695722Z","shell.execute_reply":"2022-07-06T20:57:39.008222Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Cabin <a class=\"anchor\" id=\"sec2.4.12\"></a>","metadata":{}},{"cell_type":"code","source":"print(df['Cabin'].nunique())","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:57:39.010756Z","iopub.execute_input":"2022-07-06T20:57:39.011076Z","iopub.status.idle":"2022-07-06T20:57:39.019321Z","shell.execute_reply.started":"2022-07-06T20:57:39.011046Z","shell.execute_reply":"2022-07-06T20:57:39.018142Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Name <a class=\"anchor\" id=\"sec2.4.13\"></a>","metadata":{}},{"cell_type":"code","source":"print(df['Name'].nunique())","metadata":{"execution":{"iopub.status.busy":"2022-07-06T20:57:39.020747Z","iopub.execute_input":"2022-07-06T20:57:39.021080Z","iopub.status.idle":"2022-07-06T20:57:39.035771Z","shell.execute_reply.started":"2022-07-06T20:57:39.021050Z","shell.execute_reply":"2022-07-06T20:57:39.034483Z"},"trusted":true},"execution_count":null,"outputs":[]}]}