{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.14","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"gpu","dataSources":[{"sourceId":84896,"databundleVersionId":10305135,"sourceType":"competition"},{"sourceId":9178166,"sourceType":"datasetVersion","datasetId":5547076}],"dockerImageVersionId":30805,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":true}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"<!-- Header -->\n<p style=\"background-color: #FF6F61; font-family: 'Comic Sans MS', cursive, sans-serif; font-weight: bold; color: #FFFFFF; font-size: 120%; text-align: center; border: 3px dashed #FFD700; border-radius: 16px; padding: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);\">\n    🎉 Insurance Price Prediction Using LGBM 🎉\n</p>\n\n<!-- Objective Section -->\n<h2 style=\"color: #FF6F61; font-family: 'Comic Sans MS', cursive, sans-serif; font-weight: 600; font-size: 110%; margin-top: 20px; text-decoration: underline;\">\n    Objective:\n</h2>\n<p style=\"color: #2D3748; font-family: 'Comic Sans MS', cursive, sans-serif; font-size: 100%; line-height: 1.6;\">\n    The goal of this competition is to predict the <b>Premium Amount</b> for applicants based on various factors provided in the dataset. \n    The dataset consists of features that may influence the premium amount for an insurance policy. Participants are expected to predict the premium amount for the test data based on the provided training dataset.\n</p>\n\n<!-- Evaluation Metric Section -->\n<h2 style=\"color: #FF6F61; font-family: 'Comic Sans MS', cursive, sans-serif; font-weight: 600; font-size: 110%; margin-top: 20px; text-decoration: underline;\">\n    Evaluation Metric:\n</h2>\n<p style=\"color: #2D3748; font-family: 'Comic Sans MS', cursive, sans-serif; font-size: 100%; line-height: 1.6;\">\n    The predictions will be evaluated using <b>Root Mean Squared Logarithmic Error (RMSLE)</b>. \n    This metric evaluates the difference between the predicted and actual values, with a logarithmic transformation to reduce the impact of large outliers.\n</p>\n","metadata":{}},{"cell_type":"markdown","source":"![](https://cdn-bbaid.nitrocdn.com/wYFmIWkSNKpdInpiRfVoEqTErZtkFjBo/assets/images/optimized/rev-4de3647/www.rishabhsoft.com/wp-content/uploads/2022/03/Banner-Image-Data-Analytics-in-Insurance.jpg)","metadata":{}},{"cell_type":"markdown","source":"# <p style=\"background-color: #FF6F61; font-family: 'Comic Sans MS', cursive, sans-serif; font-weight: bold; color: #FFFFFF; font-size: 100%; text-align: center; border: 3px dashed #FFD700; border-radius: 16px; padding: 14px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);\">🚀 Data Rodeo: Import Your Sidekicks</p>","metadata":{}},{"cell_type":"code","source":"import pandas as pd\nimport numpy as np\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nimport optuna\nimport math\nimport lightgbm as lgb\nfrom sklearn.ensemble import VotingRegressor\nfrom sklearn.metrics import mean_squared_log_error,make_scorer\nfrom sklearn.preprocessing import LabelEncoder\nfrom catboost import CatBoostRegressor\nfrom sklearn.model_selection import cross_val_score\nfrom sklearn.model_selection import train_test_split, KFold\nfrom sklearn.impute import SimpleImputer\nimport warnings\nwarnings.simplefilter(action='ignore', category=FutureWarning)\nwarnings.filterwarnings(\"ignore\", category=RuntimeWarning)","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:55:41.578645Z","iopub.execute_input":"2024-12-15T10:55:41.581496Z","iopub.status.idle":"2024-12-15T10:55:45.955021Z","shell.execute_reply.started":"2024-12-15T10:55:41.581428Z","shell.execute_reply":"2024-12-15T10:55:45.954068Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# <p style=\"background-color: #FF6F61; font-family: 'Comic Sans MS', cursive, sans-serif; font-weight: bold; color: #FFFFFF; font-size: 100%; text-align: center; border: 3px dashed #FFD700; border-radius: 16px; padding: 14px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);\">🧼 Data Spa Day: Preprocessing Magic</p>","metadata":{}},{"cell_type":"code","source":"train1 = pd.read_csv('/kaggle/input/playground-series-s4e12/train.csv')\ntest = pd.read_csv('/kaggle/input/playground-series-s4e12/test.csv')\nsubmission = pd.read_csv('/kaggle/input/playground-series-s4e12/sample_submission.csv')\noriginal = pd.read_csv('/kaggle/input/insurance-premium-prediction/Insurance Premium Prediction Dataset.csv')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:55:45.956473Z","iopub.execute_input":"2024-12-15T10:55:45.957031Z","iopub.status.idle":"2024-12-15T10:55:55.714785Z","shell.execute_reply.started":"2024-12-15T10:55:45.957002Z","shell.execute_reply":"2024-12-15T10:55:55.713799Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"train = pd.concat([train1, original], ignore_index=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:55:55.715931Z","iopub.execute_input":"2024-12-15T10:55:55.716251Z","iopub.status.idle":"2024-12-15T10:55:55.955971Z","shell.execute_reply.started":"2024-12-15T10:55:55.716224Z","shell.execute_reply":"2024-12-15T10:55:55.954988Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"train.drop('id', axis=1, inplace=True)\ntest.drop('id', axis=1, inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:55:55.957196Z","iopub.execute_input":"2024-12-15T10:55:55.957572Z","iopub.status.idle":"2024-12-15T10:55:56.332039Z","shell.execute_reply.started":"2024-12-15T10:55:55.957522Z","shell.execute_reply":"2024-12-15T10:55:56.331069Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"train.head()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:55:56.334279Z","iopub.execute_input":"2024-12-15T10:55:56.334581Z","iopub.status.idle":"2024-12-15T10:55:56.35736Z","shell.execute_reply.started":"2024-12-15T10:55:56.334555Z","shell.execute_reply":"2024-12-15T10:55:56.356538Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"train.info()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:55:56.358369Z","iopub.execute_input":"2024-12-15T10:55:56.358623Z","iopub.status.idle":"2024-12-15T10:55:57.029712Z","shell.execute_reply.started":"2024-12-15T10:55:56.3586Z","shell.execute_reply":"2024-12-15T10:55:57.028792Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"train.isnull().sum()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:55:57.030706Z","iopub.execute_input":"2024-12-15T10:55:57.030976Z","iopub.status.idle":"2024-12-15T10:55:57.679834Z","shell.execute_reply.started":"2024-12-15T10:55:57.030949Z","shell.execute_reply":"2024-12-15T10:55:57.678967Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"print(\"Duplicated Rows in Train Data:\",train.duplicated().sum())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:55:57.680915Z","iopub.execute_input":"2024-12-15T10:55:57.681243Z","iopub.status.idle":"2024-12-15T10:55:59.362062Z","shell.execute_reply.started":"2024-12-15T10:55:57.681214Z","shell.execute_reply":"2024-12-15T10:55:59.361081Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"print(\"Number of Rows:\",train.shape[0])\nprint(\"-\"*50)\nprint(\"Number of Column:\",train.shape[1])","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:55:59.363019Z","iopub.execute_input":"2024-12-15T10:55:59.363304Z","iopub.status.idle":"2024-12-15T10:55:59.367942Z","shell.execute_reply.started":"2024-12-15T10:55:59.363278Z","shell.execute_reply":"2024-12-15T10:55:59.367021Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# <p style=\"background-color: #FF6F61; font-family: 'Comic Sans MS', cursive, sans-serif; font-weight: bold; color: #FFFFFF; font-size: 100%; text-align: center; border: 3px dashed #FFD700; border-radius: 16px; padding: 14px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);\">🧹 Dust-Off Duty: Train Data Glow-Up\n</p>","metadata":{}},{"cell_type":"code","source":"train['Policy Start Date'] = pd.to_datetime(train['Policy Start Date'])\n\ntrain['Start Year'] = train['Policy Start Date'].dt.year\ntrain['Start Month'] = train['Policy Start Date'].dt.month\ntrain['Start Day'] = train['Policy Start Date'].dt.day","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:55:59.369099Z","iopub.execute_input":"2024-12-15T10:55:59.370191Z","iopub.status.idle":"2024-12-15T10:55:59.970302Z","shell.execute_reply.started":"2024-12-15T10:55:59.370151Z","shell.execute_reply":"2024-12-15T10:55:59.969275Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"train.drop(columns=['Policy Start Date'], inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:55:59.971557Z","iopub.execute_input":"2024-12-15T10:55:59.97192Z","iopub.status.idle":"2024-12-15T10:56:00.162789Z","shell.execute_reply.started":"2024-12-15T10:55:59.97188Z","shell.execute_reply":"2024-12-15T10:56:00.161879Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"train['Customer Feedback'] = train['Customer Feedback'].fillna(train['Customer Feedback'].mode()[0])\ntrain['Occupation'] = train['Occupation'].fillna(train['Occupation'].mode()[0])\ntrain['Marital Status'] = train['Marital Status'].fillna(train['Marital Status'].mode()[0])","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:00.163736Z","iopub.execute_input":"2024-12-15T10:56:00.163967Z","iopub.status.idle":"2024-12-15T10:56:00.724087Z","shell.execute_reply.started":"2024-12-15T10:56:00.163945Z","shell.execute_reply":"2024-12-15T10:56:00.723186Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"features_list = [\n    'Gender',\n    'Marital Status',\n    'Education Level',\n    'Occupation',\n    'Location',\n    'Policy Type',\n    'Customer Feedback',\n    'Exercise Frequency',\n    'Property Type',\n    'Smoking Status'\n]","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:00.724993Z","iopub.execute_input":"2024-12-15T10:56:00.725613Z","iopub.status.idle":"2024-12-15T10:56:00.729842Z","shell.execute_reply.started":"2024-12-15T10:56:00.725582Z","shell.execute_reply":"2024-12-15T10:56:00.728966Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"num_features = ['Age', \n                'Annual Income', \n                'Number of Dependents',\n                'Health Score',\n                'Vehicle Age',\n                'Credit Score',\n                'Previous Claims',\n                'Insurance Duration']","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:00.733069Z","iopub.execute_input":"2024-12-15T10:56:00.733373Z","iopub.status.idle":"2024-12-15T10:56:00.747827Z","shell.execute_reply.started":"2024-12-15T10:56:00.733347Z","shell.execute_reply":"2024-12-15T10:56:00.746966Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"encoders = {feature: LabelEncoder() for feature in features_list}\n\nfor feature, encoder in encoders.items():\n    train[feature] = encoder.fit_transform(train[feature])","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:00.748872Z","iopub.execute_input":"2024-12-15T10:56:00.749215Z","iopub.status.idle":"2024-12-15T10:56:03.076965Z","shell.execute_reply.started":"2024-12-15T10:56:00.749176Z","shell.execute_reply":"2024-12-15T10:56:03.076287Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"imputer = SimpleImputer(strategy='median')\ntrain[num_features] = imputer.fit_transform(train[num_features])","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:03.077824Z","iopub.execute_input":"2024-12-15T10:56:03.078065Z","iopub.status.idle":"2024-12-15T10:56:04.528354Z","shell.execute_reply.started":"2024-12-15T10:56:03.078042Z","shell.execute_reply":"2024-12-15T10:56:04.527409Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"train.head()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:04.529472Z","iopub.execute_input":"2024-12-15T10:56:04.529746Z","iopub.status.idle":"2024-12-15T10:56:04.550264Z","shell.execute_reply.started":"2024-12-15T10:56:04.529721Z","shell.execute_reply":"2024-12-15T10:56:04.549441Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# <p style=\"background-color: #FF6F61; font-family: 'Comic Sans MS', cursive, sans-serif; font-weight: bold; color: #FFFFFF; font-size: 100%; text-align: center; border: 3px dashed #FFD700; border-radius: 16px; padding: 14px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);\">🧽 Test Tidy-Up: Sparkle the Test Set</p>","metadata":{}},{"cell_type":"code","source":"test['Customer Feedback'] = test['Customer Feedback'].fillna(test['Customer Feedback'].mode()[0])\ntest['Occupation'] = test['Occupation'].fillna(test['Occupation'].mode()[0])\ntest['Marital Status'] = test['Marital Status'].fillna(test['Marital Status'].mode()[0])","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:04.551349Z","iopub.execute_input":"2024-12-15T10:56:04.55193Z","iopub.status.idle":"2024-12-15T10:56:04.822291Z","shell.execute_reply.started":"2024-12-15T10:56:04.551893Z","shell.execute_reply":"2024-12-15T10:56:04.821609Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"test['Policy Start Date'] = pd.to_datetime(test['Policy Start Date'])\ntest['Start Year'] = test['Policy Start Date'].dt.year\ntest['Start Month'] = test['Policy Start Date'].dt.month\ntest['Start Day'] = test['Policy Start Date'].dt.day","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:04.823357Z","iopub.execute_input":"2024-12-15T10:56:04.823706Z","iopub.status.idle":"2024-12-15T10:56:05.141237Z","shell.execute_reply.started":"2024-12-15T10:56:04.82367Z","shell.execute_reply":"2024-12-15T10:56:05.140546Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"test.drop(columns=['Policy Start Date'], inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:05.142144Z","iopub.execute_input":"2024-12-15T10:56:05.142414Z","iopub.status.idle":"2024-12-15T10:56:05.250064Z","shell.execute_reply.started":"2024-12-15T10:56:05.142388Z","shell.execute_reply":"2024-12-15T10:56:05.249371Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"for feature, encoder in encoders.items():\n    test[feature] = encoder.transform(test[feature])\n\ntest[num_features] = imputer.transform(test[num_features])","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:05.250985Z","iopub.execute_input":"2024-12-15T10:56:05.25126Z","iopub.status.idle":"2024-12-15T10:56:06.404102Z","shell.execute_reply.started":"2024-12-15T10:56:05.251235Z","shell.execute_reply":"2024-12-15T10:56:06.403186Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"train = train.dropna(subset=['Premium Amount'])","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:06.405315Z","iopub.execute_input":"2024-12-15T10:56:06.405977Z","iopub.status.idle":"2024-12-15T10:56:06.605374Z","shell.execute_reply.started":"2024-12-15T10:56:06.405938Z","shell.execute_reply":"2024-12-15T10:56:06.60443Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"test.head()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:06.606583Z","iopub.execute_input":"2024-12-15T10:56:06.607254Z","iopub.status.idle":"2024-12-15T10:56:06.627338Z","shell.execute_reply.started":"2024-12-15T10:56:06.607214Z","shell.execute_reply":"2024-12-15T10:56:06.626599Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# <p style=\"background-color: #FF6F61; font-family: 'Comic Sans MS', cursive, sans-serif; font-weight: bold; color: #FFFFFF; font-size: 100%; text-align: center; border: 3px dashed #FFD700; border-radius: 16px; padding: 14px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);\">✂️ The Great Divide: Splitting for Glory</p>","metadata":{}},{"cell_type":"code","source":"X = train.drop(columns=['Premium Amount'])\ny = train['Premium Amount']","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:06.628248Z","iopub.execute_input":"2024-12-15T10:56:06.628488Z","iopub.status.idle":"2024-12-15T10:56:06.77154Z","shell.execute_reply.started":"2024-12-15T10:56:06.628465Z","shell.execute_reply":"2024-12-15T10:56:06.770847Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"X_train, X_valid, y_train, y_valid = train_test_split(X, y, test_size=0.2, random_state=42)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:06.772516Z","iopub.execute_input":"2024-12-15T10:56:06.772778Z","iopub.status.idle":"2024-12-15T10:56:07.269451Z","shell.execute_reply.started":"2024-12-15T10:56:06.772752Z","shell.execute_reply":"2024-12-15T10:56:07.26841Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# <p style=\"background-color: #FF6F61; font-family: 'Comic Sans MS', cursive, sans-serif; font-weight: bold; color: #FFFFFF; font-size: 100%; text-align: center; border: 3px dashed #FFD700; border-radius: 16px; padding: 14px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);\">🧠 Model Mojo: Training the Model</p>","metadata":{}},{"cell_type":"code","source":"params = {\n    'boosting_type': 'gbdt',\n    'objective': 'mae',\n    'metric': 'mae',\n    'num_leaves': 68,\n    'learning_rate': 0.022093387918104886,\n    'feature_fraction': 0.4236204186415815,\n    'bagging_fraction': 0.47509638920022873,\n    'bagging_freq': 8,\n    'min_data_in_leaf': 22,\n    'max_depth': 14,\n    'verbosity': -1,\n    'n_jobs': -1,\n    'device': 'gpu'\n}","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:07.270803Z","iopub.execute_input":"2024-12-15T10:56:07.271083Z","iopub.status.idle":"2024-12-15T10:56:07.275759Z","shell.execute_reply.started":"2024-12-15T10:56:07.271056Z","shell.execute_reply":"2024-12-15T10:56:07.274857Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"model = lgb.LGBMRegressor(**params)\nmodel.fit(X, y)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:15.740571Z","iopub.execute_input":"2024-12-15T10:56:15.740924Z","iopub.status.idle":"2024-12-15T10:56:29.208177Z","shell.execute_reply.started":"2024-12-15T10:56:15.740895Z","shell.execute_reply":"2024-12-15T10:56:29.207416Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# <p style=\"background-color: #FF6F61; font-family: 'Comic Sans MS', cursive, sans-serif; font-weight: bold; color: #FFFFFF; font-size: 100%; text-align: center; border: 3px dashed #FFD700; border-radius: 16px; padding: 14px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);\">📤 Submission Jam: Deliver the Goods</p>","metadata":{}},{"cell_type":"code","source":"test.head()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:37.702059Z","iopub.execute_input":"2024-12-15T10:56:37.702423Z","iopub.status.idle":"2024-12-15T10:56:37.724295Z","shell.execute_reply.started":"2024-12-15T10:56:37.702393Z","shell.execute_reply":"2024-12-15T10:56:37.723428Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"preds = model.predict(test)\npredictions_df = pd.DataFrame(preds, columns=['Premium Amount'])","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:40.214769Z","iopub.execute_input":"2024-12-15T10:56:40.215426Z","iopub.status.idle":"2024-12-15T10:56:42.526476Z","shell.execute_reply.started":"2024-12-15T10:56:40.215392Z","shell.execute_reply":"2024-12-15T10:56:42.52568Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"submission = pd.DataFrame({\n    'id': submission.id,  \n    'Premium Amount': predictions_df['Premium Amount']\n})","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:49.340422Z","iopub.execute_input":"2024-12-15T10:56:49.340769Z","iopub.status.idle":"2024-12-15T10:56:49.347671Z","shell.execute_reply.started":"2024-12-15T10:56:49.340739Z","shell.execute_reply":"2024-12-15T10:56:49.346803Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"print(submission)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:52.524523Z","iopub.execute_input":"2024-12-15T10:56:52.52488Z","iopub.status.idle":"2024-12-15T10:56:52.531964Z","shell.execute_reply.started":"2024-12-15T10:56:52.52485Z","shell.execute_reply":"2024-12-15T10:56:52.531085Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"submission.to_csv('submission.csv', index=False)\nprint(\"File saved...\")","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-15T10:56:07.618103Z","iopub.status.idle":"2024-12-15T10:56:07.618434Z","shell.execute_reply.started":"2024-12-15T10:56:07.61829Z","shell.execute_reply":"2024-12-15T10:56:07.618306Z"}},"outputs":[],"execution_count":null}]}