{"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":"# VerBl_2\n# 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))\nprint(os.path)\n#mkdir ~/.kaggle\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":"2023-08-12T09:23:18.217717Z","iopub.execute_input":"2023-08-12T09:23:18.218129Z","iopub.status.idle":"2023-08-12T09:23:18.231857Z","shell.execute_reply.started":"2023-08-12T09:23:18.218098Z","shell.execute_reply":"2023-08-12T09:23:18.230582Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"###!mkdir ~/.kaggle/data/","metadata":{"execution":{"iopub.status.busy":"2023-08-11T14:59:19.000294Z","iopub.execute_input":"2023-08-11T14:59:19.000737Z","iopub.status.idle":"2023-08-11T14:59:20.098817Z","shell.execute_reply.started":"2023-08-11T14:59:19.000702Z","shell.execute_reply":"2023-08-11T14:59:20.097261Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\"\"\"for dirname, _, filenames in os.walk('/kaggle'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\"\"\"","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#df0= pd.read_csv(\"/kaggle/input/sub-ker-5580/submission.tsv\", sep=\"\\t\", header = None )\n#df0.shape\n","metadata":{"execution":{"iopub.status.busy":"2023-08-11T20:48:25.872064Z","iopub.execute_input":"2023-08-11T20:48:25.872463Z","iopub.status.idle":"2023-08-11T20:48:56.333865Z","shell.execute_reply.started":"2023-08-11T20:48:25.872433Z","shell.execute_reply":"2023-08-11T20:48:56.332776Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df1= pd.read_csv(\"/kaggle/input/sub-tor-0529/submission_t0529.tsv\", sep=\"\\t\", header = None )\ndf1.shape","metadata":{"execution":{"iopub.status.busy":"2023-08-12T09:23:26.462866Z","iopub.execute_input":"2023-08-12T09:23:26.463236Z","iopub.status.idle":"2023-08-12T09:23:29.509422Z","shell.execute_reply.started":"2023-08-12T09:23:26.463207Z","shell.execute_reply":"2023-08-12T09:23:29.507524Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df2= pd.read_csv(\"/kaggle/input/sub-tor-52579/submission.tsv\", sep=\"\\t\", header = None )\ndf2.shape","metadata":{"execution":{"iopub.status.busy":"2023-08-12T09:23:35.791411Z","iopub.execute_input":"2023-08-12T09:23:35.791789Z","iopub.status.idle":"2023-08-12T09:23:38.548179Z","shell.execute_reply.started":"2023-08-12T09:23:35.791764Z","shell.execute_reply":"2023-08-12T09:23:38.546749Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_join = df2.merge(df1, on = [0,1], how = 'outer')","metadata":{"execution":{"iopub.status.busy":"2023-08-12T09:23:40.775097Z","iopub.execute_input":"2023-08-12T09:23:40.775514Z","iopub.status.idle":"2023-08-12T09:23:48.576463Z","shell.execute_reply.started":"2023-08-12T09:23:40.775484Z","shell.execute_reply":"2023-08-12T09:23:48.574833Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_join['mean'] = df_join[['2_x','2_y']].mean(axis=1)","metadata":{"execution":{"iopub.status.busy":"2023-08-12T09:23:51.335436Z","iopub.execute_input":"2023-08-12T09:23:51.335818Z","iopub.status.idle":"2023-08-12T09:23:52.390963Z","shell.execute_reply.started":"2023-08-12T09:23:51.335788Z","shell.execute_reply":"2023-08-12T09:23:52.389734Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_join['max'] = df_join[['2_x','2_y']].max(axis=1)","metadata":{"execution":{"iopub.status.busy":"2023-08-12T09:23:55.518657Z","iopub.execute_input":"2023-08-12T09:23:55.519031Z","iopub.status.idle":"2023-08-12T09:23:56.325297Z","shell.execute_reply.started":"2023-08-12T09:23:55.519001Z","shell.execute_reply":"2023-08-12T09:23:56.323858Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#df_join.sample(40)","metadata":{"execution":{"iopub.status.busy":"2023-08-11T20:50:56.83334Z","iopub.execute_input":"2023-08-11T20:50:56.833797Z","iopub.status.idle":"2023-08-11T20:50:57.585445Z","shell.execute_reply.started":"2023-08-11T20:50:56.833764Z","shell.execute_reply":"2023-08-11T20:50:57.584318Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_join[['mean', 'max']] = df_join[['mean', 'max']].round(3)\n","metadata":{"execution":{"iopub.status.busy":"2023-08-12T09:23:59.582269Z","iopub.execute_input":"2023-08-12T09:23:59.582799Z","iopub.status.idle":"2023-08-12T09:23:59.910092Z","shell.execute_reply.started":"2023-08-12T09:23:59.582766Z","shell.execute_reply":"2023-08-12T09:23:59.909081Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_join.head()","metadata":{"execution":{"iopub.status.busy":"2023-08-12T09:38:38.69297Z","iopub.execute_input":"2023-08-12T09:38:38.693384Z","iopub.status.idle":"2023-08-12T09:38:38.708577Z","shell.execute_reply.started":"2023-08-12T09:38:38.693332Z","shell.execute_reply":"2023-08-12T09:38:38.706452Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_join.sample(5)","metadata":{"execution":{"iopub.status.busy":"2023-08-12T09:06:55.743435Z","iopub.execute_input":"2023-08-12T09:06:55.744718Z","iopub.status.idle":"2023-08-12T09:06:56.323861Z","shell.execute_reply.started":"2023-08-12T09:06:55.744655Z","shell.execute_reply":"2023-08-12T09:06:56.322422Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_join[[0,1, 'mean']].to_csv(\"submission.tsv\", sep=\"\\t\", header = None, index = False )","metadata":{"execution":{"iopub.status.busy":"2023-08-12T09:38:07.545957Z","iopub.execute_input":"2023-08-12T09:38:07.546324Z","iopub.status.idle":"2023-08-12T09:38:25.350184Z","shell.execute_reply.started":"2023-08-12T09:38:07.546293Z","shell.execute_reply":"2023-08-12T09:38:25.348685Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"###df_join[[0,1, 'mean']].to_csv(\"submission.tsv\", sep=\"\\t\", header = None )","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"###################!rm /kaggle/working/submission.tsv","metadata":{"execution":{"iopub.status.busy":"2023-08-11T21:06:40.193665Z","iopub.execute_input":"2023-08-11T21:06:40.194481Z","iopub.status.idle":"2023-08-11T21:06:41.453261Z","shell.execute_reply.started":"2023-08-11T21:06:40.19444Z","shell.execute_reply":"2023-08-11T21:06:41.451608Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"####test = pd.read_csv(\"/kaggle/working/submission.tsv\", sep=\"\\t\", header = None )\n####test.head()","metadata":{"execution":{"iopub.status.busy":"2023-08-12T09:39:30.300576Z","iopub.execute_input":"2023-08-12T09:39:30.302043Z","iopub.status.idle":"2023-08-12T09:39:33.052842Z","shell.execute_reply.started":"2023-08-12T09:39:30.30199Z","shell.execute_reply":"2023-08-12T09:39:33.05152Z"},"trusted":true},"execution_count":null,"outputs":[]}]}