{"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 matplotlib.pyplot as plt\nimport seaborn as sns","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:39:57.091770Z","iopub.execute_input":"2022-08-11T02:39:57.092167Z","iopub.status.idle":"2022-08-11T02:39:57.097899Z","shell.execute_reply.started":"2022-08-11T02:39:57.092135Z","shell.execute_reply":"2022-08-11T02:39:57.096651Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pd.set_option('use_inf_as_null', True)\npd.set_option('display.max_columns',None)\nt_orig = pd.read_csv(\"../input/tabular-playground-series-aug-2022/train.csv\")\nte_orig = pd.read_csv(\"../input/tabular-playground-series-aug-2022/test.csv\")","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:39:57.114443Z","iopub.execute_input":"2022-08-11T02:39:57.114847Z","iopub.status.idle":"2022-08-11T02:39:57.339916Z","shell.execute_reply.started":"2022-08-11T02:39:57.114815Z","shell.execute_reply":"2022-08-11T02:39:57.338429Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"t_orig.head(2)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:39:57.342384Z","iopub.execute_input":"2022-08-11T02:39:57.344830Z","iopub.status.idle":"2022-08-11T02:39:57.377705Z","shell.execute_reply.started":"2022-08-11T02:39:57.344773Z","shell.execute_reply":"2022-08-11T02:39:57.376483Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from sklearn.preprocessing import LabelBinarizer,OrdinalEncoder,LabelEncoder\nle = LabelEncoder()\nlb = LabelBinarizer()\noe = OrdinalEncoder()\nt_orig['attribute_0'] = lb.fit_transform(t_orig[['attribute_0']])\nt_orig['attribute_1'] = le.fit_transform(t_orig[['attribute_1']])\nt_orig['product_code'] = le.fit_transform(t_orig[['product_code']])\nte_orig['attribute_0'] = lb.fit_transform(te_orig[['attribute_0']])\nte_orig['attribute_1'] = le.fit_transform(te_orig[['attribute_1']])\nte_orig['product_code'] = le.fit_transform(te_orig[['product_code']])","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:39:57.379899Z","iopub.execute_input":"2022-08-11T02:39:57.380665Z","iopub.status.idle":"2022-08-11T02:39:57.576992Z","shell.execute_reply.started":"2022-08-11T02:39:57.380616Z","shell.execute_reply":"2022-08-11T02:39:57.575109Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"t_orig.head(2)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:39:57.580708Z","iopub.execute_input":"2022-08-11T02:39:57.581127Z","iopub.status.idle":"2022-08-11T02:39:57.607932Z","shell.execute_reply.started":"2022-08-11T02:39:57.581090Z","shell.execute_reply":"2022-08-11T02:39:57.606711Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"t_orig.drop('id',axis = 1,inplace = True)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:39:57.609757Z","iopub.execute_input":"2022-08-11T02:39:57.610506Z","iopub.status.idle":"2022-08-11T02:39:57.620852Z","shell.execute_reply.started":"2022-08-11T02:39:57.610460Z","shell.execute_reply":"2022-08-11T02:39:57.619392Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def reduce_mem_usage(df):\n    start_mem = df.memory_usage().sum() / 1024**2\n    print('Memory usage of dataframe is {:.2f} MB'.format(start_mem))\n    \n    for col in df.columns:\n        col_type = df[col].dtype\n        \n        if col_type != object:\n            c_min = df[col].min()\n            c_max = df[col].max()\n            if str(col_type)[:3] == 'int':\n                if c_min > np.iinfo(np.int8).min and c_max < np.iinfo(np.int8).max:\n                    df[col] = df[col].astype(np.int8)\n                elif c_min > np.iinfo(np.int16).min and c_max < np.iinfo(np.int16).max:\n                    df[col] = df[col].astype(np.int16)\n                elif c_min > np.iinfo(np.int32).min and c_max < np.iinfo(np.int32).max:\n                    df[col] = df[col].astype(np.int32)\n                elif c_min > np.iinfo(np.int64).min and c_max < np.iinfo(np.int64).max:\n                    df[col] = df[col].astype(np.int64)  \n            else:\n                if c_min > np.finfo(np.float16).min and c_max < np.finfo(np.float16).max:\n                    df[col] = df[col].astype(np.float16)\n                elif c_min > np.finfo(np.float32).min and c_max < np.finfo(np.float32).max:\n                    df[col] = df[col].astype(np.float32)\n                else:\n                    df[col] = df[col].astype(np.float64)\n        else:\n            df[col] = df[col].astype('category')\n\n    end_mem = df.memory_usage().sum() / 1024**2\n    print('Memory usage after optimization is: {:.2f} MB'.format(end_mem))\n    print('Decreased by {:.1f}%'.format(100 * (start_mem - end_mem) / start_mem))\n    \n    return df","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:39:57.622838Z","iopub.execute_input":"2022-08-11T02:39:57.623696Z","iopub.status.idle":"2022-08-11T02:39:57.641916Z","shell.execute_reply.started":"2022-08-11T02:39:57.623648Z","shell.execute_reply":"2022-08-11T02:39:57.640822Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"t_orig = reduce_mem_usage(t_orig)\nte_orig = reduce_mem_usage(te_orig)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:39:57.643659Z","iopub.execute_input":"2022-08-11T02:39:57.644470Z","iopub.status.idle":"2022-08-11T02:39:57.730687Z","shell.execute_reply.started":"2022-08-11T02:39:57.644422Z","shell.execute_reply":"2022-08-11T02:39:57.729533Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"t_orig.head()","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:39:57.732038Z","iopub.execute_input":"2022-08-11T02:39:57.733162Z","iopub.status.idle":"2022-08-11T02:39:57.765106Z","shell.execute_reply.started":"2022-08-11T02:39:57.733123Z","shell.execute_reply":"2022-08-11T02:39:57.763590Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"te_orig.head()","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:39:57.767095Z","iopub.execute_input":"2022-08-11T02:39:57.768128Z","iopub.status.idle":"2022-08-11T02:39:57.802931Z","shell.execute_reply.started":"2022-08-11T02:39:57.768074Z","shell.execute_reply":"2022-08-11T02:39:57.801722Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"t_orig.describe()","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:39:57.809423Z","iopub.execute_input":"2022-08-11T02:39:57.810093Z","iopub.status.idle":"2022-08-11T02:39:57.988270Z","shell.execute_reply.started":"2022-08-11T02:39:57.810042Z","shell.execute_reply":"2022-08-11T02:39:57.986740Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"x = t_orig.drop(['failure'],axis = 1)\ny = t_orig['failure']","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:39:57.990480Z","iopub.execute_input":"2022-08-11T02:39:57.990906Z","iopub.status.idle":"2022-08-11T02:39:58.000219Z","shell.execute_reply.started":"2022-08-11T02:39:57.990868Z","shell.execute_reply":"2022-08-11T02:39:57.998916Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"id = te_orig['id']\nte_orig.drop(['id'],axis = 1,inplace = True)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:39:58.001859Z","iopub.execute_input":"2022-08-11T02:39:58.003339Z","iopub.status.idle":"2022-08-11T02:39:58.015463Z","shell.execute_reply.started":"2022-08-11T02:39:58.003206Z","shell.execute_reply":"2022-08-11T02:39:58.014040Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from sklearn.impute import KNNImputer \nna_cols = [col for col in x.columns if x[col].isna().sum() != 0]\nimputer = KNNImputer(n_neighbors = 3)\nx[na_cols] = imputer.fit_transform(x[na_cols])","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:39:58.017578Z","iopub.execute_input":"2022-08-11T02:39:58.018083Z","iopub.status.idle":"2022-08-11T02:40:25.475013Z","shell.execute_reply.started":"2022-08-11T02:39:58.018036Z","shell.execute_reply":"2022-08-11T02:40:25.473811Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"na1_cols = [col for col in te_orig.columns if te_orig[col].isna().sum() != 0]\nimputer = KNNImputer(n_neighbors = 3)\nte_orig[na_cols] = imputer.fit_transform(te_orig[na_cols])","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:40:25.476482Z","iopub.execute_input":"2022-08-11T02:40:25.476811Z","iopub.status.idle":"2022-08-11T02:40:42.065518Z","shell.execute_reply.started":"2022-08-11T02:40:25.476780Z","shell.execute_reply":"2022-08-11T02:40:42.064339Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#x.replace([np.inf, -np.inf], np.nan, inplace=True)\n#te_orig.replace([np.inf, -np.inf], np.nan, inplace=True)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:40:42.067036Z","iopub.execute_input":"2022-08-11T02:40:42.067455Z","iopub.status.idle":"2022-08-11T02:40:42.072313Z","shell.execute_reply.started":"2022-08-11T02:40:42.067385Z","shell.execute_reply":"2022-08-11T02:40:42.071024Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#x.fillna(x.mean(), inplace=True)\n#te_orig.fillna(te_orig.mean(),inplace = True)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:40:42.073855Z","iopub.execute_input":"2022-08-11T02:40:42.074621Z","iopub.status.idle":"2022-08-11T02:40:42.084797Z","shell.execute_reply.started":"2022-08-11T02:40:42.074576Z","shell.execute_reply":"2022-08-11T02:40:42.083385Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# for i in x.columns:\n#     x[i] = round(x[i]/10,3)\n#     print(x[i].unique())","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:40:42.086668Z","iopub.execute_input":"2022-08-11T02:40:42.087434Z","iopub.status.idle":"2022-08-11T02:40:42.096633Z","shell.execute_reply.started":"2022-08-11T02:40:42.087388Z","shell.execute_reply":"2022-08-11T02:40:42.095538Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"x.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:40:42.098155Z","iopub.execute_input":"2022-08-11T02:40:42.098839Z","iopub.status.idle":"2022-08-11T02:40:42.115941Z","shell.execute_reply.started":"2022-08-11T02:40:42.098789Z","shell.execute_reply":"2022-08-11T02:40:42.114827Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"y.value_counts()","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:40:42.117629Z","iopub.execute_input":"2022-08-11T02:40:42.118280Z","iopub.status.idle":"2022-08-11T02:40:42.127392Z","shell.execute_reply.started":"2022-08-11T02:40:42.118245Z","shell.execute_reply":"2022-08-11T02:40:42.125828Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from sklearn.decomposition import KernelPCA\npc= KernelPCA(n_components = 5,kernel = 'rbf')","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:40:42.129230Z","iopub.execute_input":"2022-08-11T02:40:42.130720Z","iopub.status.idle":"2022-08-11T02:40:42.136289Z","shell.execute_reply.started":"2022-08-11T02:40:42.130682Z","shell.execute_reply":"2022-08-11T02:40:42.134768Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"x=pc.fit_transform(x)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:40:42.138203Z","iopub.execute_input":"2022-08-11T02:40:42.139397Z","iopub.status.idle":"2022-08-11T02:41:47.689783Z","shell.execute_reply.started":"2022-08-11T02:40:42.139353Z","shell.execute_reply":"2022-08-11T02:41:47.688163Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"te_orig = pc.transform(te_orig)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:41:47.692319Z","iopub.execute_input":"2022-08-11T02:41:47.693381Z","iopub.status.idle":"2022-08-11T02:42:08.143508Z","shell.execute_reply.started":"2022-08-11T02:41:47.693317Z","shell.execute_reply":"2022-08-11T02:42:08.141623Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from sklearn.preprocessing import MinMaxScaler,PowerTransformer\nm = MinMaxScaler()\nx=m.fit_transform(x)\np= PowerTransformer()\nx \np = p.fit(x)\n# x = m.fit_transform(x)\n# from sklearn.linear_model import LogisticRegression\n# l = LogisticRegression(max_iter = 30000,class_weight = ({0:0.7},{1:0.3}),solver = 'saga',C = 0.5,)\n# l.fit(x,y)\n# pred_t = l.predict(x)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:42:08.146259Z","iopub.execute_input":"2022-08-11T02:42:08.147087Z","iopub.status.idle":"2022-08-11T02:42:08.347437Z","shell.execute_reply.started":"2022-08-11T02:42:08.147023Z","shell.execute_reply":"2022-08-11T02:42:08.346289Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"x.shape","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:42:08.348872Z","iopub.execute_input":"2022-08-11T02:42:08.349602Z","iopub.status.idle":"2022-08-11T02:42:08.356595Z","shell.execute_reply.started":"2022-08-11T02:42:08.349552Z","shell.execute_reply":"2022-08-11T02:42:08.355400Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"te_orig.shape","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:42:08.357973Z","iopub.execute_input":"2022-08-11T02:42:08.358408Z","iopub.status.idle":"2022-08-11T02:42:08.376726Z","shell.execute_reply.started":"2022-08-11T02:42:08.358374Z","shell.execute_reply":"2022-08-11T02:42:08.375262Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from sklearn.metrics import f1_score,confusion_matrix\n# f1_score(pred_t,y)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:42:08.379538Z","iopub.execute_input":"2022-08-11T02:42:08.380133Z","iopub.status.idle":"2022-08-11T02:42:08.386495Z","shell.execute_reply.started":"2022-08-11T02:42:08.380088Z","shell.execute_reply":"2022-08-11T02:42:08.385275Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# confusion_matrix(pred_t,y)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:42:08.388284Z","iopub.execute_input":"2022-08-11T02:42:08.389368Z","iopub.status.idle":"2022-08-11T02:42:08.397059Z","shell.execute_reply.started":"2022-08-11T02:42:08.389322Z","shell.execute_reply":"2022-08-11T02:42:08.395653Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#8te_orig = pc.transform(te_orig)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:42:08.404515Z","iopub.execute_input":"2022-08-11T02:42:08.405703Z","iopub.status.idle":"2022-08-11T02:42:08.409323Z","shell.execute_reply.started":"2022-08-11T02:42:08.405663Z","shell.execute_reply":"2022-08-11T02:42:08.408408Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"te_orig.shape","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:42:08.410594Z","iopub.execute_input":"2022-08-11T02:42:08.411362Z","iopub.status.idle":"2022-08-11T02:42:08.425554Z","shell.execute_reply.started":"2022-08-11T02:42:08.411273Z","shell.execute_reply":"2022-08-11T02:42:08.424391Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"te_orig = m.transform(te_orig)\nte_orig=p.transform(te_orig)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:42:08.429777Z","iopub.execute_input":"2022-08-11T02:42:08.430787Z","iopub.status.idle":"2022-08-11T02:42:08.445597Z","shell.execute_reply.started":"2022-08-11T02:42:08.430751Z","shell.execute_reply":"2022-08-11T02:42:08.444638Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# pred2=l.predict(te_orig)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:42:08.447437Z","iopub.execute_input":"2022-08-11T02:42:08.448251Z","iopub.status.idle":"2022-08-11T02:42:08.453212Z","shell.execute_reply.started":"2022-08-11T02:42:08.448208Z","shell.execute_reply":"2022-08-11T02:42:08.451879Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from sklearn.svm import LinearSVC\nlv = LinearSVC(C = 10.0,random_state = 1,max_iter = 500000,class_weight = {0:0.7,1:0.3})\nlv.fit(x,y)\nf1_score(lv.predict(x),y)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:42:08.454946Z","iopub.execute_input":"2022-08-11T02:42:08.455754Z","iopub.status.idle":"2022-08-11T02:42:09.068621Z","shell.execute_reply.started":"2022-08-11T02:42:08.455706Z","shell.execute_reply":"2022-08-11T02:42:09.067086Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pred3 = lv.predict(te_orig)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:42:09.070087Z","iopub.execute_input":"2022-08-11T02:42:09.070802Z","iopub.status.idle":"2022-08-11T02:42:09.078191Z","shell.execute_reply.started":"2022-08-11T02:42:09.070755Z","shell.execute_reply":"2022-08-11T02:42:09.076957Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"x.shape","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:42:09.080317Z","iopub.execute_input":"2022-08-11T02:42:09.080873Z","iopub.status.idle":"2022-08-11T02:42:09.090570Z","shell.execute_reply.started":"2022-08-11T02:42:09.080829Z","shell.execute_reply":"2022-08-11T02:42:09.089349Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# from sklearn.neighbors import KNeighborsClassifier\n# kn = KNeighborsClassifier(n_neighbors = 3,weights = 'distance')\n# kn.fit(x,y)\n# f1_score(kn.predict(x),y)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:42:09.092544Z","iopub.execute_input":"2022-08-11T02:42:09.093086Z","iopub.status.idle":"2022-08-11T02:42:09.100041Z","shell.execute_reply.started":"2022-08-11T02:42:09.093042Z","shell.execute_reply":"2022-08-11T02:42:09.098685Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# from sklearn.ensemble import RandomForestClassifier\n# rf = RandomForestClassifier(class_weight = {0:0.3,1:0.7},min_samples_leaf = 2,criterion = 'gini')\n# rf.fit(x,y)\n# f1_score(rf.predict(x),y)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:42:09.101763Z","iopub.execute_input":"2022-08-11T02:42:09.102266Z","iopub.status.idle":"2022-08-11T02:42:09.111486Z","shell.execute_reply.started":"2022-08-11T02:42:09.102225Z","shell.execute_reply":"2022-08-11T02:42:09.110279Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# pred3 = l.predict(te_orig)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:42:09.113603Z","iopub.execute_input":"2022-08-11T02:42:09.114176Z","iopub.status.idle":"2022-08-11T02:42:09.127666Z","shell.execute_reply.started":"2022-08-11T02:42:09.114130Z","shell.execute_reply":"2022-08-11T02:42:09.126017Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sub = pd.DataFrame((id,pred3)).T","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:42:09.129572Z","iopub.execute_input":"2022-08-11T02:42:09.130136Z","iopub.status.idle":"2022-08-11T02:42:09.430247Z","shell.execute_reply.started":"2022-08-11T02:42:09.130090Z","shell.execute_reply":"2022-08-11T02:42:09.429175Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sub = sub.rename({'Unnamed 0':'failure'},axis = 1)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:42:09.431612Z","iopub.execute_input":"2022-08-11T02:42:09.431958Z","iopub.status.idle":"2022-08-11T02:42:09.437950Z","shell.execute_reply.started":"2022-08-11T02:42:09.431927Z","shell.execute_reply":"2022-08-11T02:42:09.436806Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sub.head()","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:42:09.439856Z","iopub.execute_input":"2022-08-11T02:42:09.440282Z","iopub.status.idle":"2022-08-11T02:42:09.454773Z","shell.execute_reply.started":"2022-08-11T02:42:09.440238Z","shell.execute_reply":"2022-08-11T02:42:09.453626Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sub.to_csv('submission.csv',index = False)","metadata":{"execution":{"iopub.status.busy":"2022-08-11T02:42:09.456250Z","iopub.execute_input":"2022-08-11T02:42:09.456626Z","iopub.status.idle":"2022-08-11T02:42:09.490185Z","shell.execute_reply.started":"2022-08-11T02:42:09.456594Z","shell.execute_reply":"2022-08-11T02:42:09.489384Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}