{"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 warnings\nwarnings.simplefilter('ignore')\n\nimport pandas as pd\n\npd.set_option('display.max_columns', None)","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2023-08-26T16:06:40.447177Z","iopub.execute_input":"2023-08-26T16:06:40.447556Z","iopub.status.idle":"2023-08-26T16:06:40.484771Z","shell.execute_reply.started":"2023-08-26T16:06:40.447527Z","shell.execute_reply":"2023-08-26T16:06:40.483982Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train = pd.read_csv('/kaggle/input/rsna-2023-abdominal-trauma-detection/train.csv')\ntrain","metadata":{"execution":{"iopub.status.busy":"2023-08-26T16:06:40.486144Z","iopub.execute_input":"2023-08-26T16:06:40.486912Z","iopub.status.idle":"2023-08-26T16:06:40.532563Z","shell.execute_reply.started":"2023-08-26T16:06:40.486885Z","shell.execute_reply":"2023-08-26T16:06:40.531612Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"features = [col for col in train.columns if col != 'patient_id']\nfeatures","metadata":{"execution":{"iopub.status.busy":"2023-08-26T16:06:40.533926Z","iopub.execute_input":"2023-08-26T16:06:40.534258Z","iopub.status.idle":"2023-08-26T16:06:40.543797Z","shell.execute_reply.started":"2023-08-26T16:06:40.534225Z","shell.execute_reply":"2023-08-26T16:06:40.542074Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission = pd.read_csv('/kaggle/input/rsna-2023-abdominal-trauma-detection/sample_submission.csv')\nsubmission[features] = train[features].mean().tolist()\n\nfor feature in features:\n    if feature.split('_')[1] == 'low' or feature == 'bowel_injury':\n        submission[feature] *= 4\n    elif feature.split('_')[1] == 'high':\n        submission[feature] *= 6\n    elif feature.split('_')[1] == 'injury' and feature != 'bowel_injury':\n        submission[feature] *= 28\n        \n\nsubmission.to_csv('submission.csv', index=False)","metadata":{"execution":{"iopub.status.busy":"2023-08-26T16:06:40.5476Z","iopub.execute_input":"2023-08-26T16:06:40.548473Z","iopub.status.idle":"2023-08-26T16:06:40.586041Z","shell.execute_reply.started":"2023-08-26T16:06:40.548438Z","shell.execute_reply":"2023-08-26T16:06:40.585169Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pd.DataFrame(submission)","metadata":{"execution":{"iopub.status.busy":"2023-08-26T16:06:40.589229Z","iopub.execute_input":"2023-08-26T16:06:40.58964Z","iopub.status.idle":"2023-08-26T16:06:40.610991Z","shell.execute_reply.started":"2023-08-26T16:06:40.589608Z","shell.execute_reply":"2023-08-26T16:06:40.609705Z"},"trusted":true},"execution_count":null,"outputs":[]}]}