{"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 warnings\nwarnings.simplefilter('ignore')","metadata":{"execution":{"iopub.status.busy":"2023-08-27T09:02:19.508938Z","iopub.execute_input":"2023-08-27T09:02:19.5093Z","iopub.status.idle":"2023-08-27T09:02:19.541598Z","shell.execute_reply.started":"2023-08-27T09:02:19.509271Z","shell.execute_reply":"2023-08-27T09:02:19.540379Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pd.set_option('display.max_columns', None)\nrsna_train = pd.read_csv(\"/kaggle/input/rsna-2023-abdominal-trauma-detection/train.csv\")\nrsna_train.head()","metadata":{"execution":{"iopub.status.busy":"2023-08-27T09:03:58.613603Z","iopub.execute_input":"2023-08-27T09:03:58.613999Z","iopub.status.idle":"2023-08-27T09:03:58.644071Z","shell.execute_reply.started":"2023-08-27T09:03:58.61397Z","shell.execute_reply":"2023-08-27T09:03:58.643345Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"features = [col for col in rsna_train.columns if col != 'patient_id']\nfeatures","metadata":{"execution":{"iopub.status.busy":"2023-08-27T09:04:43.708258Z","iopub.execute_input":"2023-08-27T09:04:43.708674Z","iopub.status.idle":"2023-08-27T09:04:43.716395Z","shell.execute_reply.started":"2023-08-27T09:04:43.708642Z","shell.execute_reply":"2023-08-27T09:04:43.715076Z"},"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] = rsna_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","metadata":{"execution":{"iopub.status.busy":"2023-08-27T09:05:55.793448Z","iopub.execute_input":"2023-08-27T09:05:55.793862Z","iopub.status.idle":"2023-08-27T09:05:55.82339Z","shell.execute_reply.started":"2023-08-27T09:05:55.793831Z","shell.execute_reply":"2023-08-27T09:05:55.822437Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pd.DataFrame(submission)","metadata":{"execution":{"iopub.status.busy":"2023-08-27T09:06:49.697458Z","iopub.execute_input":"2023-08-27T09:06:49.69781Z","iopub.status.idle":"2023-08-27T09:06:49.717973Z","shell.execute_reply.started":"2023-08-27T09:06:49.697781Z","shell.execute_reply":"2023-08-27T09:06:49.715996Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission.to_csv('submission.csv', index=False)","metadata":{"execution":{"iopub.status.busy":"2023-08-27T09:06:52.525436Z","iopub.execute_input":"2023-08-27T09:06:52.526705Z","iopub.status.idle":"2023-08-27T09:06:52.536925Z","shell.execute_reply.started":"2023-08-27T09:06:52.526652Z","shell.execute_reply":"2023-08-27T09:06:52.535108Z"},"trusted":true},"execution_count":null,"outputs":[]}]}