{"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 seaborn as sns\nimport matplotlib.pyplot as plt\nimport warnings\nwarnings.filterwarnings('ignore')\n\n\n# To have a consistent and nice plot format\nplt.rcParams[\"figure.figsize\"] = (12,8)\nplt.style.use('fivethirtyeight')\ncolor_pal = sns.color_palette()\n\n#plt.rcParams.update({\n#    \"text.usetex\": True,\n#    \"font.family\": \"serif\",\n#    \"font.serif\": [\"Palatino\"],\n#})","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-08-03T10:56:32.789935Z","iopub.execute_input":"2022-08-03T10:56:32.790407Z","iopub.status.idle":"2022-08-03T10:56:33.332077Z","shell.execute_reply.started":"2022-08-03T10:56:32.790322Z","shell.execute_reply":"2022-08-03T10:56:33.330912Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data = pd.read_csv('../input/spaceship-titanic/train.csv')\ndata.info()","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:33.333882Z","iopub.execute_input":"2022-08-03T10:56:33.334335Z","iopub.status.idle":"2022-08-03T10:56:33.380460Z","shell.execute_reply.started":"2022-08-03T10:56:33.334286Z","shell.execute_reply":"2022-08-03T10:56:33.379158Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data.corr().style.background_gradient(cmap='coolwarm').set_precision(3)","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:33.382081Z","iopub.execute_input":"2022-08-03T10:56:33.382443Z","iopub.status.idle":"2022-08-03T10:56:33.464739Z","shell.execute_reply.started":"2022-08-03T10:56:33.382411Z","shell.execute_reply":"2022-08-03T10:56:33.463580Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#This function was obtained from another notebook.\ndef missing_values(df):\n    missing_number = df.isnull().sum().sort_values(ascending=False)[df.isnull().sum().sort_values(ascending=False) !=0]\n    missing_percent=round((df.isnull().sum()/df.isnull().count())*100,2)[round((df.isnull().sum()/df.isnull().count())*100,2) !=0]\n    missing = pd.concat([missing_number,missing_percent],axis=1,keys=['Missing Number','Missing Percentage'])\n    return missing","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:33.467697Z","iopub.execute_input":"2022-08-03T10:56:33.468035Z","iopub.status.idle":"2022-08-03T10:56:33.475252Z","shell.execute_reply.started":"2022-08-03T10:56:33.468004Z","shell.execute_reply":"2022-08-03T10:56:33.474080Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"missing_values(data).style.background_gradient(cmap='coolwarm').set_precision(2)","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:33.476585Z","iopub.execute_input":"2022-08-03T10:56:33.476952Z","iopub.status.idle":"2022-08-03T10:56:33.525207Z","shell.execute_reply.started":"2022-08-03T10:56:33.476920Z","shell.execute_reply":"2022-08-03T10:56:33.523984Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"features_tbf = [\"ShoppingMall\",\"FoodCourt\",\"Spa\",\"VRDeck\",\"RoomService\",\"Age\"]\n\nfor tbf in features_tbf:\n    data[tbf] = data[tbf].fillna(data[tbf].mean())","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:33.527077Z","iopub.execute_input":"2022-08-03T10:56:33.527478Z","iopub.status.idle":"2022-08-03T10:56:33.536040Z","shell.execute_reply.started":"2022-08-03T10:56:33.527445Z","shell.execute_reply":"2022-08-03T10:56:33.535133Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"missing_values(data).style.background_gradient(cmap='coolwarm').set_precision(2)","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:33.536944Z","iopub.execute_input":"2022-08-03T10:56:33.537281Z","iopub.status.idle":"2022-08-03T10:56:33.582911Z","shell.execute_reply.started":"2022-08-03T10:56:33.537251Z","shell.execute_reply":"2022-08-03T10:56:33.581875Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"We can infer what was the percentage of people that went into cryosleep and extrapolate to the larger amount. assuming that the percentage of people is the same","metadata":{}},{"cell_type":"code","source":"data.CryoSleep.value_counts() / len(data.CryoSleep) * 100","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:33.585276Z","iopub.execute_input":"2022-08-03T10:56:33.585704Z","iopub.status.idle":"2022-08-03T10:56:33.596333Z","shell.execute_reply.started":"2022-08-03T10:56:33.585662Z","shell.execute_reply":"2022-08-03T10:56:33.595190Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def fill_cryo(x) -> bool:\n    if x is True or x is False:\n        return x\n    rnd = np.random.random()*100\n    if rnd < 35:\n        return True\n    else:\n        return False","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:33.597994Z","iopub.execute_input":"2022-08-03T10:56:33.598454Z","iopub.status.idle":"2022-08-03T10:56:33.605788Z","shell.execute_reply.started":"2022-08-03T10:56:33.598413Z","shell.execute_reply":"2022-08-03T10:56:33.604556Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data['CryoSleep'] = data['CryoSleep'].map(lambda x : fill_cryo(x))","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:33.607533Z","iopub.execute_input":"2022-08-03T10:56:33.607939Z","iopub.status.idle":"2022-08-03T10:56:33.618474Z","shell.execute_reply.started":"2022-08-03T10:56:33.607899Z","shell.execute_reply":"2022-08-03T10:56:33.617498Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"Similarily, we can do the same for VIP, Homeplanet and Destination,","metadata":{}},{"cell_type":"code","source":"def fill_vip(x) -> bool:\n    if x is True or x is False:\n        return x\n    rnd = np.random.random()*100\n    if rnd < 2.2:\n        return True\n    else:\n        return False\n    \ndef fill_home(x) -> str:\n    if x in ['Earth','Europa','Mars']:\n        return x\n    rnd = np.random.random()*100\n    if rnd < 53:\n        return \"Earth\"\n    elif (rnd >=53) & (rnd < 77):\n        return \"Europa\"\n    else:\n        return \"Mars\"\n\ndef fill_dest(x) -> str:\n    dest = ['TRAPPIST-1e', 'PSO J318.5-22', '55 Cancri e']\n    if x in dest:\n        return x\n    rnd = np.random.random()*100\n    if rnd < 68:\n        return 'TRAPPIST-1e'\n    elif (rnd >=68) & (rnd < 89):\n        return '55 Cancri e'\n    else:\n        return 'PSO J318.5-22'","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:33.620277Z","iopub.execute_input":"2022-08-03T10:56:33.620766Z","iopub.status.idle":"2022-08-03T10:56:33.632209Z","shell.execute_reply.started":"2022-08-03T10:56:33.620724Z","shell.execute_reply":"2022-08-03T10:56:33.631339Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data['VIP'] = data['VIP'].map(lambda x : fill_vip(x))\ndata['HomePlanet'] = data['HomePlanet'].map(lambda x : fill_home(x))\ndata['Destination'] = data['Destination'].map(lambda x : fill_dest(x))","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:33.634846Z","iopub.execute_input":"2022-08-03T10:56:33.635246Z","iopub.status.idle":"2022-08-03T10:56:33.659666Z","shell.execute_reply.started":"2022-08-03T10:56:33.635213Z","shell.execute_reply":"2022-08-03T10:56:33.658489Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data = data.drop('Name',axis=1).drop('PassengerId',axis=1).drop('Cabin',axis=1)\ndata = data.dropna()\ndata.info()","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:33.664079Z","iopub.execute_input":"2022-08-03T10:56:33.664754Z","iopub.status.idle":"2022-08-03T10:56:33.688895Z","shell.execute_reply.started":"2022-08-03T10:56:33.664718Z","shell.execute_reply":"2022-08-03T10:56:33.688095Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"missing_values(data).style.background_gradient(cmap='coolwarm').set_precision(2)","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:33.690322Z","iopub.execute_input":"2022-08-03T10:56:33.690904Z","iopub.status.idle":"2022-08-03T10:56:33.719367Z","shell.execute_reply.started":"2022-08-03T10:56:33.690871Z","shell.execute_reply":"2022-08-03T10:56:33.718378Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig,ax = plt.subplots(2,2)\n\nsns.distplot(data.Age,ax=ax[0,0])\nsns.distplot(data.ShoppingMall,ax=ax[0,1])\nax[0,1].set_xlim(0,1000)\nax[0,1].set_ylabel('')\nsns.distplot(data.VRDeck,ax=ax[1,0])\nax[1,0].set_xlim(0,1000)\nsns.distplot(data.FoodCourt,ax=ax[1,1])\nax[1,1].set_xlim(0,1000)\nax[1,1].set_ylabel('')","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:33.720534Z","iopub.execute_input":"2022-08-03T10:56:33.721170Z","iopub.status.idle":"2022-08-03T10:56:34.736611Z","shell.execute_reply.started":"2022-08-03T10:56:33.721133Z","shell.execute_reply":"2022-08-03T10:56:34.735299Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig,ax = plt.subplots(2,2)\n\nax[0,0].pie(data.HomePlanet.value_counts(),labels = data.HomePlanet.unique(),\n            explode = [0.1,0.1,0.1],shadow = True,autopct= \"%1.1f%%\")\nax[0,0].set_ylabel('Home Planet')\n\nax[0,1].pie(data.CryoSleep.value_counts(),labels = data.CryoSleep.unique(),\n            explode = [0.1,0.1],shadow = True,autopct= \"%1.1f%%\")\nax[0,1].set_ylabel('Cryo Sleep')\n\nax[1,0].pie(data.Destination.value_counts(),labels = data.Destination.unique(),\n            explode = [0.1,0.1,0.1],shadow = True,autopct= \"%1.1f%%\")\nax[1,0].set_ylabel('Destination')\n\n\nax[1,1].pie(data.VIP.value_counts(),labels = data.VIP.unique(),\n            explode = [0.1,0.1],shadow = True,autopct= \"%1.1f%%\")\n\nax[1,1].set_ylabel('VIP',y = 0.4)","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:34.738514Z","iopub.execute_input":"2022-08-03T10:56:34.739286Z","iopub.status.idle":"2022-08-03T10:56:35.191117Z","shell.execute_reply.started":"2022-08-03T10:56:34.739242Z","shell.execute_reply":"2022-08-03T10:56:35.189952Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tot_spend = data.RoomService.values + data.FoodCourt.values + data.ShoppingMall.values + data.Spa.values + data.VRDeck.values\ndata['TotalSpenditure'] = tot_spend","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:35.192346Z","iopub.execute_input":"2022-08-03T10:56:35.192664Z","iopub.status.idle":"2022-08-03T10:56:35.199114Z","shell.execute_reply.started":"2022-08-03T10:56:35.192635Z","shell.execute_reply":"2022-08-03T10:56:35.198099Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.heatmap(data.corr(),annot=True)","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:35.200451Z","iopub.execute_input":"2022-08-03T10:56:35.201086Z","iopub.status.idle":"2022-08-03T10:56:35.915586Z","shell.execute_reply.started":"2022-08-03T10:56:35.201030Z","shell.execute_reply":"2022-08-03T10:56:35.914456Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.jointplot(x = 'Age',y='TotalSpenditure',kind='reg',data=data,size = 10)","metadata":{"execution":{"iopub.status.busy":"2022-08-03T11:11:14.131203Z","iopub.execute_input":"2022-08-03T11:11:14.131599Z","iopub.status.idle":"2022-08-03T11:11:15.885883Z","shell.execute_reply.started":"2022-08-03T11:11:14.131567Z","shell.execute_reply":"2022-08-03T11:11:15.884822Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.barplot(x = data.CryoSleep.values,y = data.Transported.values)","metadata":{"execution":{"iopub.status.busy":"2022-08-03T11:12:17.212399Z","iopub.execute_input":"2022-08-03T11:12:17.212958Z","iopub.status.idle":"2022-08-03T11:12:17.564379Z","shell.execute_reply.started":"2022-08-03T11:12:17.212909Z","shell.execute_reply":"2022-08-03T11:12:17.563148Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"We can continue to obtain the predictions! I've chosen XGBoostClassifier","metadata":{}},{"cell_type":"code","source":"cat_features = [\"HomePlanet\",\"CryoSleep\",\"Destination\",\"VIP\"]\nnum_features = [\"Age\",\"RoomService\",\"FoodCourt\",\"ShoppingMall\",\"Spa\",\"VRDeck\",\"TotalSpenditure\"]","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:35.917245Z","iopub.execute_input":"2022-08-03T10:56:35.918319Z","iopub.status.idle":"2022-08-03T10:56:35.923601Z","shell.execute_reply.started":"2022-08-03T10:56:35.918281Z","shell.execute_reply":"2022-08-03T10:56:35.922548Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from sklearn.preprocessing import StandardScaler,OneHotEncoder,OrdinalEncoder\nfrom sklearn.compose import ColumnTransformer","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:35.924849Z","iopub.execute_input":"2022-08-03T10:56:35.925235Z","iopub.status.idle":"2022-08-03T10:56:35.976093Z","shell.execute_reply.started":"2022-08-03T10:56:35.925187Z","shell.execute_reply":"2022-08-03T10:56:35.975199Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"X = data.drop('Transported',axis=1)\nY = data[['Transported']]","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:35.977280Z","iopub.execute_input":"2022-08-03T10:56:35.977592Z","iopub.status.idle":"2022-08-03T10:56:35.985665Z","shell.execute_reply.started":"2022-08-03T10:56:35.977563Z","shell.execute_reply":"2022-08-03T10:56:35.984929Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"std_scaler = StandardScaler()\n\npipeline = ColumnTransformer([\n    (\"num\",std_scaler,num_features),\n    (\"cat\",OneHotEncoder(),cat_features)\n])\nx_prep = pipeline.fit_transform(X)\ny_prep = OrdinalEncoder().fit_transform(Y)","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:35.987338Z","iopub.execute_input":"2022-08-03T10:56:35.987646Z","iopub.status.idle":"2022-08-03T10:56:36.016280Z","shell.execute_reply.started":"2022-08-03T10:56:35.987617Z","shell.execute_reply":"2022-08-03T10:56:36.015131Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# now, let us split it into train and validation:\nfrom sklearn.model_selection import train_test_split\nx_train,x_test,y_train,y_test = train_test_split(x_prep,y_prep)","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:36.018011Z","iopub.execute_input":"2022-08-03T10:56:36.018382Z","iopub.status.idle":"2022-08-03T10:56:36.039543Z","shell.execute_reply.started":"2022-08-03T10:56:36.018350Z","shell.execute_reply":"2022-08-03T10:56:36.038699Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from xgboost import XGBClassifier\n\nxgb_class = XGBClassifier()\nxgb_class.fit(x_train,y_train,eval_set = [(x_train,y_train),(x_test,y_test)],verbose=False,eval_metric='rmse')","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:36.040857Z","iopub.execute_input":"2022-08-03T10:56:36.041725Z","iopub.status.idle":"2022-08-03T10:56:38.052087Z","shell.execute_reply.started":"2022-08-03T10:56:36.041690Z","shell.execute_reply":"2022-08-03T10:56:38.051103Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from sklearn.model_selection import cross_val_score,RepeatedStratifiedKFold","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:38.055758Z","iopub.execute_input":"2022-08-03T10:56:38.056160Z","iopub.status.idle":"2022-08-03T10:56:38.060893Z","shell.execute_reply.started":"2022-08-03T10:56:38.056125Z","shell.execute_reply":"2022-08-03T10:56:38.059992Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cv = RepeatedStratifiedKFold(n_splits=10,n_repeats=3,random_state=42)\ncross_val_score(xgb_class,x_train,y_train , cv = cv ,verbose=False).mean()","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:56:38.062256Z","iopub.execute_input":"2022-08-03T10:56:38.062676Z","iopub.status.idle":"2022-08-03T10:57:02.401673Z","shell.execute_reply.started":"2022-08-03T10:56:38.062630Z","shell.execute_reply":"2022-08-03T10:57:02.400802Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"We have a score of 78.8 without changing many parameters!","metadata":{}},{"cell_type":"code","source":"test_data = pd.read_csv('../input/spaceship-titanic/test.csv')","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:57:02.405442Z","iopub.execute_input":"2022-08-03T10:57:02.406354Z","iopub.status.idle":"2022-08-03T10:57:02.431163Z","shell.execute_reply.started":"2022-08-03T10:57:02.406316Z","shell.execute_reply":"2022-08-03T10:57:02.430008Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# we have to prepare this data... again\n\ntest_data['CryoSleep'] = test_data['CryoSleep'].map(lambda x : fill_cryo(x))\ntest_data['HomePlanet'] = test_data['HomePlanet'].map(lambda x : fill_home(x))\ntest_data['Destination'] = test_data['Destination'].map(lambda x : fill_dest(x))\ntest_data['VIP'] = test_data['VIP'].map(lambda x : fill_vip(x))\n\nfeatures_tbf = [\"ShoppingMall\",\"FoodCourt\",\"Spa\",\"VRDeck\",\"RoomService\",\"Age\"]\n\nfor tbf in features_tbf:\n    test_data[tbf] = test_data[tbf].fillna(data[tbf].mean())\n    \ntest_data['TotalSpenditure'] = test_data.ShoppingMall.values + test_data.FoodCourt.values + test_data.Spa.values + test_data.VRDeck.values + test_data.RoomService.values","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:57:53.133069Z","iopub.execute_input":"2022-08-03T10:57:53.133495Z","iopub.status.idle":"2022-08-03T10:57:53.155717Z","shell.execute_reply.started":"2022-08-03T10:57:53.133462Z","shell.execute_reply":"2022-08-03T10:57:53.154498Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pipeline = ColumnTransformer([\n    (\"num\",std_scaler,num_features),\n    (\"cat\",OneHotEncoder(),cat_features)\n])","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:57:55.490894Z","iopub.execute_input":"2022-08-03T10:57:55.491326Z","iopub.status.idle":"2022-08-03T10:57:55.496682Z","shell.execute_reply.started":"2022-08-03T10:57:55.491293Z","shell.execute_reply":"2022-08-03T10:57:55.495536Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"X_test_prep = pipeline.fit_transform(test_data)","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:57:55.975146Z","iopub.execute_input":"2022-08-03T10:57:55.975748Z","iopub.status.idle":"2022-08-03T10:57:55.993900Z","shell.execute_reply.started":"2022-08-03T10:57:55.975715Z","shell.execute_reply":"2022-08-03T10:57:55.992923Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"predictions = xgb_class.predict(X_test_prep).astype(bool)","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:57:58.476037Z","iopub.execute_input":"2022-08-03T10:57:58.476669Z","iopub.status.idle":"2022-08-03T10:57:58.493134Z","shell.execute_reply.started":"2022-08-03T10:57:58.476635Z","shell.execute_reply":"2022-08-03T10:57:58.490219Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission = pd.DataFrame(columns=['PassengerID','Transported'])\n\nsubmission['PassengerID'] = test_data['PassengerId']\nsubmission['Transported'] = predictions","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:57:59.282836Z","iopub.execute_input":"2022-08-03T10:57:59.283767Z","iopub.status.idle":"2022-08-03T10:57:59.292990Z","shell.execute_reply.started":"2022-08-03T10:57:59.283721Z","shell.execute_reply":"2022-08-03T10:57:59.292022Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission.to_csv(\"submission.csv\",index = False)\nprint('submission succesful')","metadata":{"execution":{"iopub.status.busy":"2022-08-03T10:57:59.751759Z","iopub.execute_input":"2022-08-03T10:57:59.752533Z","iopub.status.idle":"2022-08-03T10:57:59.766260Z","shell.execute_reply.started":"2022-08-03T10:57:59.752489Z","shell.execute_reply":"2022-08-03T10:57:59.765108Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}