{"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":"2023-08-11T12:43:14.746314Z","iopub.execute_input":"2023-08-11T12:43:14.746843Z","iopub.status.idle":"2023-08-11T12:43:14.805853Z","shell.execute_reply.started":"2023-08-11T12:43:14.7468Z","shell.execute_reply":"2023-08-11T12:43:14.804623Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df= pd.read_csv(\"/kaggle/input/keras-cafa5-sub/submission (2).tsv\", sep=\"\\t\", header = None )\ndf.shape","metadata":{"execution":{"iopub.status.busy":"2023-08-11T13:10:31.662407Z","iopub.execute_input":"2023-08-11T13:10:31.662948Z","iopub.status.idle":"2023-08-11T13:10:56.947997Z","shell.execute_reply.started":"2023-08-11T13:10:31.662904Z","shell.execute_reply":"2023-08-11T13:10:56.947008Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df1= pd.read_csv(\"/kaggle/input/pytorch-cafa5-sub/submission (3).tsv\", sep=\"\\t\", header = None )\ndf1.shape","metadata":{"execution":{"iopub.status.busy":"2023-08-11T13:11:07.563405Z","iopub.execute_input":"2023-08-11T13:11:07.563879Z","iopub.status.idle":"2023-08-11T13:11:12.567345Z","shell.execute_reply.started":"2023-08-11T13:11:07.563842Z","shell.execute_reply":"2023-08-11T13:11:12.566369Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#df_merged = df.merge(df1, on = [0,1], how = 'inner')","metadata":{"execution":{"iopub.status.busy":"2023-08-11T13:40:19.27523Z","iopub.execute_input":"2023-08-11T13:40:19.275822Z","iopub.status.idle":"2023-08-11T13:41:09.349773Z","shell.execute_reply.started":"2023-08-11T13:40:19.275777Z","shell.execute_reply":"2023-08-11T13:41:09.34795Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#del(df_merged)","metadata":{"execution":{"iopub.status.busy":"2023-08-11T13:47:02.604879Z","iopub.execute_input":"2023-08-11T13:47:02.605516Z","iopub.status.idle":"2023-08-11T13:47:02.611848Z","shell.execute_reply.started":"2023-08-11T13:47:02.60547Z","shell.execute_reply":"2023-08-11T13:47:02.610736Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#df_merged[2] = (df_merged['2_x']+df_merged['2_y'])/2\n#df_merged.drop(['2_x','2_y'],axis=1,inplace=True)","metadata":{"execution":{"iopub.status.busy":"2023-08-11T13:42:54.749192Z","iopub.execute_input":"2023-08-11T13:42:54.749819Z","iopub.status.idle":"2023-08-11T13:42:55.224465Z","shell.execute_reply.started":"2023-08-11T13:42:54.74976Z","shell.execute_reply":"2023-08-11T13:42:55.222653Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_merged = df.merge(df1, on = [0,1], how = 'outer')","metadata":{"execution":{"iopub.status.busy":"2023-08-11T13:48:28.335396Z","iopub.execute_input":"2023-08-11T13:48:28.336045Z","iopub.status.idle":"2023-08-11T13:49:27.494057Z","shell.execute_reply.started":"2023-08-11T13:48:28.335999Z","shell.execute_reply":"2023-08-11T13:49:27.492567Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_merged[2] = df_merged[['2_x','2_y']].mean(axis=1)","metadata":{"execution":{"iopub.status.busy":"2023-08-11T13:53:19.487797Z","iopub.execute_input":"2023-08-11T13:53:19.488952Z","iopub.status.idle":"2023-08-11T13:53:23.48539Z","shell.execute_reply.started":"2023-08-11T13:53:19.488899Z","shell.execute_reply":"2023-08-11T13:53:23.483934Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_merged.drop(['2_x','2_y'],axis=1,inplace=True)","metadata":{"execution":{"iopub.status.busy":"2023-08-11T13:53:25.899526Z","iopub.execute_input":"2023-08-11T13:53:25.899952Z","iopub.status.idle":"2023-08-11T13:53:27.71191Z","shell.execute_reply.started":"2023-08-11T13:53:25.899915Z","shell.execute_reply":"2023-08-11T13:53:27.710677Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#blended = (df1[2] + df[2])/2","metadata":{"execution":{"iopub.status.busy":"2023-08-11T12:45:02.453071Z","iopub.execute_input":"2023-08-11T12:45:02.45362Z","iopub.status.idle":"2023-08-11T12:45:04.340193Z","shell.execute_reply.started":"2023-08-11T12:45:02.45357Z","shell.execute_reply":"2023-08-11T12:45:04.338641Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#df1[2]= blended","metadata":{"execution":{"iopub.status.busy":"2023-08-11T12:45:26.946443Z","iopub.execute_input":"2023-08-11T12:45:26.947817Z","iopub.status.idle":"2023-08-11T12:45:32.790563Z","shell.execute_reply.started":"2023-08-11T12:45:26.947765Z","shell.execute_reply":"2023-08-11T12:45:32.789176Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_merged.to_csv(\"submission.tsv\",header=False, index=False,sep='\\t')","metadata":{"execution":{"iopub.status.busy":"2023-08-11T13:53:54.573147Z","iopub.execute_input":"2023-08-11T13:53:54.573715Z","iopub.status.idle":"2023-08-11T13:57:19.452668Z","shell.execute_reply.started":"2023-08-11T13:53:54.573675Z","shell.execute_reply":"2023-08-11T13:57:19.451233Z"},"trusted":true},"execution_count":null,"outputs":[]}]}