{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"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-09-01T12:34:45.692601Z","iopub.execute_input":"2023-09-01T12:34:45.692919Z","iopub.status.idle":"2023-09-01T12:34:46.001732Z","shell.execute_reply.started":"2023-09-01T12:34:45.692896Z","shell.execute_reply":"2023-09-01T12:34:46.000809Z"},"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-09-01T12:34:46.003213Z","iopub.execute_input":"2023-09-01T12:34:46.003578Z","iopub.status.idle":"2023-09-01T12:34:46.04231Z","shell.execute_reply.started":"2023-09-01T12:34:46.003556Z","shell.execute_reply":"2023-09-01T12:34:46.041412Z"},"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-09-01T12:34:46.043647Z","iopub.execute_input":"2023-09-01T12:34:46.043894Z","iopub.status.idle":"2023-09-01T12:34:46.050007Z","shell.execute_reply.started":"2023-09-01T12:34:46.043873Z","shell.execute_reply":"2023-09-01T12:34:46.049126Z"},"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-09-01T12:34:46.052313Z","iopub.execute_input":"2023-09-01T12:34:46.053176Z","iopub.status.idle":"2023-09-01T12:34:46.080092Z","shell.execute_reply.started":"2023-09-01T12:34:46.053149Z","shell.execute_reply":"2023-09-01T12:34:46.07903Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pd.DataFrame(submission)","metadata":{"execution":{"iopub.status.busy":"2023-09-01T12:34:46.081188Z","iopub.execute_input":"2023-09-01T12:34:46.081758Z","iopub.status.idle":"2023-09-01T12:34:46.098052Z","shell.execute_reply.started":"2023-09-01T12:34:46.081735Z","shell.execute_reply":"2023-09-01T12:34:46.097011Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission.to_csv('submission.csv', index=False)","metadata":{"execution":{"iopub.status.busy":"2023-09-01T12:34:46.100129Z","iopub.execute_input":"2023-09-01T12:34:46.101255Z","iopub.status.idle":"2023-09-01T12:34:46.109539Z","shell.execute_reply.started":"2023-09-01T12:34:46.101213Z","shell.execute_reply":"2023-09-01T12:34:46.108575Z"},"trusted":true},"execution_count":null,"outputs":[]}],"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"}}