{"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\n# import numpy as np # linear algebra\n# import 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\n# import os\n# for dirname, _, filenames in os.walk('/kaggle/input'):\n#     for filename in filenames:\n#         print(os.path.join(dirname, filename))\n\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":"2021-07-23T08:55:10.333892Z","iopub.execute_input":"2021-07-23T08:55:10.334511Z","iopub.status.idle":"2021-07-23T08:55:10.339157Z","shell.execute_reply.started":"2021-07-23T08:55:10.334461Z","shell.execute_reply":"2021-07-23T08:55:10.338345Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import numpy as np \nimport pandas as pd \n\nDATA_DIR = \"../input/siim-covid19-detection\"\nWORK_DIR = \"../input\"\n\ndf_sample_submit = pd.read_csv(DATA_DIR + \"/sample_submission.csv\")\ndf_work_study = pd.read_csv(\"../input/merge-b4-b5-swin-efv2l-f03/merge_b4-b5-swin_03fold_v2l_03.csv\")\ndf_work_image = pd.read_csv(\"../input/qnsres/submit.csv\")\n# df_work_study = pd.read_csv(\"../input/submit-4cls/MERGE_SUBMIT_base_v2_wa_bs8_multi-label_fine_0-1-2-3-4_0.58-0.5-0.74-0.88-0.54.csv\")\n\n\ndf_sample_submit = df_sample_submit.set_index(\"id\")\ndf_work_image = df_work_image.set_index(\"id\")\ndf_work_study = df_work_study.set_index(\"id\")\n\ndf_submit = df_sample_submit.copy()\ndf_submit.loc[df_work_study.index, \"PredictionString\"] = df_work_study.PredictionString.values\n# df_submit.loc[df_work_image.index, \"PredictionString\"] = df_work_image.PredictionString.values\n# df_submit.loc[df_work_study.index, \"PredictionString\"] = df_work_study.PredictionString.values\n\ndf_submit.loc[df_work_image.index, \"PredictionString\"] = \"\"\n# df_submit.loc[df_work_study.index, \"PredictionString\"] = \"\"","metadata":{"execution":{"iopub.status.busy":"2021-07-23T08:55:10.340341Z","iopub.execute_input":"2021-07-23T08:55:10.340754Z","iopub.status.idle":"2021-07-23T08:55:10.445642Z","shell.execute_reply.started":"2021-07-23T08:55:10.340725Z","shell.execute_reply":"2021-07-23T08:55:10.444797Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_submit = df_submit.reset_index(drop=False)\nprint(df_submit)\ndf_submit[[\"id\", \"PredictionString\"]].to_csv(\"./submission.csv\", index=False)","metadata":{"execution":{"iopub.status.busy":"2021-07-23T08:55:10.446987Z","iopub.execute_input":"2021-07-23T08:55:10.447414Z","iopub.status.idle":"2021-07-23T08:55:10.474561Z","shell.execute_reply.started":"2021-07-23T08:55:10.447382Z","shell.execute_reply":"2021-07-23T08:55:10.473252Z"},"trusted":true},"execution_count":null,"outputs":[]}]}