{"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":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-07-25T07:21:14.522537Z","iopub.execute_input":"2022-07-25T07:21:14.523599Z","iopub.status.idle":"2022-07-25T07:21:14.557801Z","shell.execute_reply.started":"2022-07-25T07:21:14.523472Z","shell.execute_reply":"2022-07-25T07:21:14.557053Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df = pd.read_csv(\"/kaggle/input/spaceship-titanic/train.csv\")","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:26:29.986533Z","iopub.execute_input":"2022-07-25T07:26:29.986966Z","iopub.status.idle":"2022-07-25T07:26:30.022255Z","shell.execute_reply.started":"2022-07-25T07:26:29.986932Z","shell.execute_reply":"2022-07-25T07:26:30.021368Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:26:30.325130Z","iopub.execute_input":"2022-07-25T07:26:30.325514Z","iopub.status.idle":"2022-07-25T07:26:30.357905Z","shell.execute_reply.started":"2022-07-25T07:26:30.325482Z","shell.execute_reply":"2022-07-25T07:26:30.357197Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from sklearn.preprocessing import LabelEncoder\n\nle = LabelEncoder()\ndf.Transported = le.fit_transform(df['Transported'])","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:26:30.765902Z","iopub.execute_input":"2022-07-25T07:26:30.766461Z","iopub.status.idle":"2022-07-25T07:26:30.773583Z","shell.execute_reply.started":"2022-07-25T07:26:30.766418Z","shell.execute_reply":"2022-07-25T07:26:30.772431Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:26:31.372525Z","iopub.execute_input":"2022-07-25T07:26:31.373318Z","iopub.status.idle":"2022-07-25T07:26:31.403561Z","shell.execute_reply.started":"2022-07-25T07:26:31.373277Z","shell.execute_reply":"2022-07-25T07:26:31.402849Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.drop(['PassengerId'], axis=1, inplace=True)","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:26:32.014947Z","iopub.execute_input":"2022-07-25T07:26:32.015607Z","iopub.status.idle":"2022-07-25T07:26:32.022151Z","shell.execute_reply.started":"2022-07-25T07:26:32.015571Z","shell.execute_reply":"2022-07-25T07:26:32.021335Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:26:32.666440Z","iopub.execute_input":"2022-07-25T07:26:32.667167Z","iopub.status.idle":"2022-07-25T07:26:32.696154Z","shell.execute_reply.started":"2022-07-25T07:26:32.667118Z","shell.execute_reply":"2022-07-25T07:26:32.695075Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.drop(['Name'], axis=1, inplace=True)","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:26:33.491121Z","iopub.execute_input":"2022-07-25T07:26:33.491506Z","iopub.status.idle":"2022-07-25T07:26:33.497725Z","shell.execute_reply.started":"2022-07-25T07:26:33.491473Z","shell.execute_reply":"2022-07-25T07:26:33.496901Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:26:34.822070Z","iopub.execute_input":"2022-07-25T07:26:34.822702Z","iopub.status.idle":"2022-07-25T07:26:34.849691Z","shell.execute_reply.started":"2022-07-25T07:26:34.822665Z","shell.execute_reply":"2022-07-25T07:26:34.848835Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.VIP = le.fit_transform(df['VIP'])","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:26:36.342993Z","iopub.execute_input":"2022-07-25T07:26:36.343705Z","iopub.status.idle":"2022-07-25T07:26:36.351299Z","shell.execute_reply.started":"2022-07-25T07:26:36.343668Z","shell.execute_reply":"2022-07-25T07:26:36.350127Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:26:38.665671Z","iopub.execute_input":"2022-07-25T07:26:38.666433Z","iopub.status.idle":"2022-07-25T07:26:38.695582Z","shell.execute_reply.started":"2022-07-25T07:26:38.666398Z","shell.execute_reply":"2022-07-25T07:26:38.694431Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.Destination = le.fit_transform(df['Destination'])","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:26:41.532759Z","iopub.execute_input":"2022-07-25T07:26:41.533937Z","iopub.status.idle":"2022-07-25T07:26:41.542533Z","shell.execute_reply.started":"2022-07-25T07:26:41.533886Z","shell.execute_reply":"2022-07-25T07:26:41.541377Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:26:42.630994Z","iopub.execute_input":"2022-07-25T07:26:42.631888Z","iopub.status.idle":"2022-07-25T07:26:42.657770Z","shell.execute_reply.started":"2022-07-25T07:26:42.631838Z","shell.execute_reply":"2022-07-25T07:26:42.656719Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.CryoSleep = le.fit_transform(df['CryoSleep'])","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:27:18.242928Z","iopub.execute_input":"2022-07-25T07:27:18.243284Z","iopub.status.idle":"2022-07-25T07:27:18.251151Z","shell.execute_reply.started":"2022-07-25T07:27:18.243257Z","shell.execute_reply":"2022-07-25T07:27:18.250429Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:27:20.283588Z","iopub.execute_input":"2022-07-25T07:27:20.283968Z","iopub.status.idle":"2022-07-25T07:27:20.312238Z","shell.execute_reply.started":"2022-07-25T07:27:20.283935Z","shell.execute_reply":"2022-07-25T07:27:20.310916Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.drop(['Cabin'], axis=1, inplace=True)","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:27:43.274029Z","iopub.execute_input":"2022-07-25T07:27:43.274378Z","iopub.status.idle":"2022-07-25T07:27:43.282669Z","shell.execute_reply.started":"2022-07-25T07:27:43.274350Z","shell.execute_reply":"2022-07-25T07:27:43.281423Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:27:45.610699Z","iopub.execute_input":"2022-07-25T07:27:45.611083Z","iopub.status.idle":"2022-07-25T07:27:45.637187Z","shell.execute_reply.started":"2022-07-25T07:27:45.611056Z","shell.execute_reply":"2022-07-25T07:27:45.636233Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.HomePlanet = le.fit_transform(df['HomePlanet'])","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:28:06.409542Z","iopub.execute_input":"2022-07-25T07:28:06.410652Z","iopub.status.idle":"2022-07-25T07:28:06.422260Z","shell.execute_reply.started":"2022-07-25T07:28:06.410598Z","shell.execute_reply":"2022-07-25T07:28:06.419885Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:28:09.178057Z","iopub.execute_input":"2022-07-25T07:28:09.178388Z","iopub.status.idle":"2022-07-25T07:28:09.205736Z","shell.execute_reply.started":"2022-07-25T07:28:09.178362Z","shell.execute_reply":"2022-07-25T07:28:09.204871Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:28:17.592252Z","iopub.execute_input":"2022-07-25T07:28:17.593299Z","iopub.status.idle":"2022-07-25T07:28:17.604461Z","shell.execute_reply.started":"2022-07-25T07:28:17.593250Z","shell.execute_reply":"2022-07-25T07:28:17.603319Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['Age'].fillna(df['Age'].median(skipna=True),inplace=True)","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:29:19.085419Z","iopub.execute_input":"2022-07-25T07:29:19.085779Z","iopub.status.idle":"2022-07-25T07:29:19.095355Z","shell.execute_reply.started":"2022-07-25T07:29:19.085750Z","shell.execute_reply":"2022-07-25T07:29:19.094106Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:29:28.442477Z","iopub.execute_input":"2022-07-25T07:29:28.442855Z","iopub.status.idle":"2022-07-25T07:29:28.453925Z","shell.execute_reply.started":"2022-07-25T07:29:28.442823Z","shell.execute_reply":"2022-07-25T07:29:28.452884Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df = df.dropna()","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:31:22.930511Z","iopub.execute_input":"2022-07-25T07:31:22.930868Z","iopub.status.idle":"2022-07-25T07:31:22.939771Z","shell.execute_reply.started":"2022-07-25T07:31:22.930840Z","shell.execute_reply":"2022-07-25T07:31:22.938830Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:31:24.582092Z","iopub.execute_input":"2022-07-25T07:31:24.582447Z","iopub.status.idle":"2022-07-25T07:31:24.607470Z","shell.execute_reply.started":"2022-07-25T07:31:24.582419Z","shell.execute_reply":"2022-07-25T07:31:24.606354Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"y = df.Transported\nx = df.drop(['Transported'], axis=1)","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:33:04.404081Z","iopub.execute_input":"2022-07-25T07:33:04.404633Z","iopub.status.idle":"2022-07-25T07:33:04.412181Z","shell.execute_reply.started":"2022-07-25T07:33:04.404584Z","shell.execute_reply":"2022-07-25T07:33:04.411403Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from sklearn.preprocessing import StandardScaler\n\nsc = StandardScaler()\ns_x = sc.fit_transform(x)","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:33:28.115816Z","iopub.execute_input":"2022-07-25T07:33:28.116197Z","iopub.status.idle":"2022-07-25T07:33:28.127795Z","shell.execute_reply.started":"2022-07-25T07:33:28.116165Z","shell.execute_reply":"2022-07-25T07:33:28.126916Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"s_x","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:33:32.320377Z","iopub.execute_input":"2022-07-25T07:33:32.320776Z","iopub.status.idle":"2022-07-25T07:33:32.327768Z","shell.execute_reply.started":"2022-07-25T07:33:32.320744Z","shell.execute_reply":"2022-07-25T07:33:32.327066Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from sklearn.model_selection import train_test_split\nx_train,x_test,y_train,y_test=train_test_split(s_x,y,random_state=0,test_size=0.25)","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:33:49.935059Z","iopub.execute_input":"2022-07-25T07:33:49.935478Z","iopub.status.idle":"2022-07-25T07:33:49.996406Z","shell.execute_reply.started":"2022-07-25T07:33:49.935356Z","shell.execute_reply":"2022-07-25T07:33:49.995476Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"x_train","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:33:54.964375Z","iopub.execute_input":"2022-07-25T07:33:54.964896Z","iopub.status.idle":"2022-07-25T07:33:54.973067Z","shell.execute_reply.started":"2022-07-25T07:33:54.964849Z","shell.execute_reply":"2022-07-25T07:33:54.972019Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"x_train.shape","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:34:07.077796Z","iopub.execute_input":"2022-07-25T07:34:07.078636Z","iopub.status.idle":"2022-07-25T07:34:07.086192Z","shell.execute_reply.started":"2022-07-25T07:34:07.078585Z","shell.execute_reply":"2022-07-25T07:34:07.085174Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from sklearn.linear_model import LogisticRegression\n\nmodel = LogisticRegression()\nmodel.fit(x_train, y_train)","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:35:12.757850Z","iopub.execute_input":"2022-07-25T07:35:12.758232Z","iopub.status.idle":"2022-07-25T07:35:12.811291Z","shell.execute_reply.started":"2022-07-25T07:35:12.758199Z","shell.execute_reply":"2022-07-25T07:35:12.810156Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pred = model.predict(x_test)","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:35:32.451033Z","iopub.execute_input":"2022-07-25T07:35:32.452082Z","iopub.status.idle":"2022-07-25T07:35:32.456779Z","shell.execute_reply.started":"2022-07-25T07:35:32.452045Z","shell.execute_reply":"2022-07-25T07:35:32.455680Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"model.score(x_test, y_test)","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:35:58.258072Z","iopub.execute_input":"2022-07-25T07:35:58.258788Z","iopub.status.idle":"2022-07-25T07:35:58.269288Z","shell.execute_reply.started":"2022-07-25T07:35:58.258749Z","shell.execute_reply":"2022-07-25T07:35:58.268146Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from sklearn.metrics import classification_report\n\nreport=classification_report(y_test,pred)\nprint(report)","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:36:48.580169Z","iopub.execute_input":"2022-07-25T07:36:48.580595Z","iopub.status.idle":"2022-07-25T07:36:48.593627Z","shell.execute_reply.started":"2022-07-25T07:36:48.580559Z","shell.execute_reply":"2022-07-25T07:36:48.592432Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test = pd.read_csv(\"/kaggle/input/spaceship-titanic/test.csv\")","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:44:42.050085Z","iopub.execute_input":"2022-07-25T07:44:42.050442Z","iopub.status.idle":"2022-07-25T07:44:42.072873Z","shell.execute_reply.started":"2022-07-25T07:44:42.050413Z","shell.execute_reply":"2022-07-25T07:44:42.072120Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test1 = test.copy()\ntest","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:44:42.957234Z","iopub.execute_input":"2022-07-25T07:44:42.958348Z","iopub.status.idle":"2022-07-25T07:44:42.989649Z","shell.execute_reply.started":"2022-07-25T07:44:42.958295Z","shell.execute_reply":"2022-07-25T07:44:42.988873Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test.drop(['Name', 'PassengerId', 'Cabin'], axis=1, inplace=True)","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:44:43.350004Z","iopub.execute_input":"2022-07-25T07:44:43.350622Z","iopub.status.idle":"2022-07-25T07:44:43.357706Z","shell.execute_reply.started":"2022-07-25T07:44:43.350557Z","shell.execute_reply":"2022-07-25T07:44:43.356637Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:44:43.827147Z","iopub.execute_input":"2022-07-25T07:44:43.827607Z","iopub.status.idle":"2022-07-25T07:44:43.853096Z","shell.execute_reply.started":"2022-07-25T07:44:43.827568Z","shell.execute_reply":"2022-07-25T07:44:43.851958Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test.HomePlanet = le.fit_transform(test['HomePlanet'])\ntest.CryoSleep = le.fit_transform(test['CryoSleep'])\ntest.Destination = le.fit_transform(test['Destination'])\ntest.VIP = le.fit_transform(test['VIP'])","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:44:44.204587Z","iopub.execute_input":"2022-07-25T07:44:44.204952Z","iopub.status.idle":"2022-07-25T07:44:44.217999Z","shell.execute_reply.started":"2022-07-25T07:44:44.204915Z","shell.execute_reply":"2022-07-25T07:44:44.216865Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:44:44.959321Z","iopub.execute_input":"2022-07-25T07:44:44.960107Z","iopub.status.idle":"2022-07-25T07:44:44.970520Z","shell.execute_reply.started":"2022-07-25T07:44:44.960066Z","shell.execute_reply":"2022-07-25T07:44:44.969584Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:44:45.689466Z","iopub.execute_input":"2022-07-25T07:44:45.692144Z","iopub.status.idle":"2022-07-25T07:44:45.720403Z","shell.execute_reply.started":"2022-07-25T07:44:45.692107Z","shell.execute_reply":"2022-07-25T07:44:45.719601Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test = test.fillna(test.mean())","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:44:47.773498Z","iopub.execute_input":"2022-07-25T07:44:47.773865Z","iopub.status.idle":"2022-07-25T07:44:47.786432Z","shell.execute_reply.started":"2022-07-25T07:44:47.773836Z","shell.execute_reply":"2022-07-25T07:44:47.785408Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:44:48.509534Z","iopub.execute_input":"2022-07-25T07:44:48.510423Z","iopub.status.idle":"2022-07-25T07:44:48.519996Z","shell.execute_reply.started":"2022-07-25T07:44:48.510350Z","shell.execute_reply":"2022-07-25T07:44:48.519297Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_x = sc.fit_transform(test)","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:44:49.417443Z","iopub.execute_input":"2022-07-25T07:44:49.418049Z","iopub.status.idle":"2022-07-25T07:44:49.428018Z","shell.execute_reply.started":"2022-07-25T07:44:49.418017Z","shell.execute_reply":"2022-07-25T07:44:49.426862Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_x","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:44:51.733653Z","iopub.execute_input":"2022-07-25T07:44:51.734212Z","iopub.status.idle":"2022-07-25T07:44:51.740205Z","shell.execute_reply.started":"2022-07-25T07:44:51.734181Z","shell.execute_reply":"2022-07-25T07:44:51.739335Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pred = model.predict(test_x)","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:44:56.965034Z","iopub.execute_input":"2022-07-25T07:44:56.965454Z","iopub.status.idle":"2022-07-25T07:44:56.971459Z","shell.execute_reply.started":"2022-07-25T07:44:56.965418Z","shell.execute_reply":"2022-07-25T07:44:56.970444Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"output = pd.DataFrame({'PassengerId': test1.PassengerId,'Transported': pred})\noutput['Transported'] = output['Transported'].map({0.0:False, 1.0:True})\noutput.to_csv('submission.csv', index=False)","metadata":{"execution":{"iopub.status.busy":"2022-07-25T07:49:42.638284Z","iopub.execute_input":"2022-07-25T07:49:42.638668Z","iopub.status.idle":"2022-07-25T07:49:42.659307Z","shell.execute_reply.started":"2022-07-25T07:49:42.638638Z","shell.execute_reply":"2022-07-25T07:49:42.658237Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}