{"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 numpy as np\nimport tqdm\nimport os \nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport matplotlib.animation as animation\nimport seaborn as sns\nimport warnings\nwarnings.filterwarnings(\"ignore\")","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2023-08-11T05:36:04.163735Z","iopub.execute_input":"2023-08-11T05:36:04.164146Z","iopub.status.idle":"2023-08-11T05:36:04.433708Z","shell.execute_reply.started":"2023-08-11T05:36:04.1641Z","shell.execute_reply":"2023-08-11T05:36:04.432526Z"}},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pip install pydicom\n","metadata":{"execution":{"iopub.status.busy":"2023-08-11T05:36:05.522386Z","iopub.execute_input":"2023-08-11T05:36:05.52284Z","iopub.status.idle":"2023-08-11T05:36:19.343926Z","shell.execute_reply.started":"2023-08-11T05:36:05.522806Z","shell.execute_reply":"2023-08-11T05:36:19.342223Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df=pd.read_csv(\"/kaggle/input/rsna-2023-abdominal-trauma-detection/train.csv\")\nprint(df.shape)\ndf.head()\n","metadata":{"execution":{"iopub.status.busy":"2023-08-11T05:56:44.492088Z","iopub.execute_input":"2023-08-11T05:56:44.49339Z","iopub.status.idle":"2023-08-11T05:56:44.519927Z","shell.execute_reply.started":"2023-08-11T05:56:44.493347Z","shell.execute_reply":"2023-08-11T05:56:44.518942Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import pydicom\nimage_file = \"/kaggle/input/rsna-2023-abdominal-trauma-detection/train_images/10004/21057/1001.dcm\"\nds = pydicom.read_file(image_file)\ntrain_csv = pd.read_csv(\"/kaggle/input/rsna-2023-abdominal-trauma-detection/train.csv\")\n\nds","metadata":{"execution":{"iopub.status.busy":"2023-08-11T06:11:09.340985Z","iopub.execute_input":"2023-08-11T06:11:09.342265Z","iopub.status.idle":"2023-08-11T06:11:09.373879Z","shell.execute_reply.started":"2023-08-11T06:11:09.342223Z","shell.execute_reply":"2023-08-11T06:11:09.372679Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"! pip install dataprep\nfrom dataprep.eda import create_report\n# Create an EDA report\nreport = create_report(df)\n\n# Display the report\nreport.show_browser()","metadata":{"execution":{"iopub.status.busy":"2023-08-11T07:17:33.415195Z","iopub.execute_input":"2023-08-11T07:17:33.415625Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"report","metadata":{"execution":{"iopub.status.busy":"2023-08-11T06:04:48.189058Z","iopub.execute_input":"2023-08-11T06:04:48.189518Z","iopub.status.idle":"2023-08-11T06:04:48.267278Z","shell.execute_reply.started":"2023-08-11T06:04:48.189485Z","shell.execute_reply":"2023-08-11T06:04:48.265951Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Path to the DICOM image\nimage_file = \"/kaggle/input/rsna-2023-abdominal-trauma-detection/train_images/10004/21057/1001.dcm\"\n\n# Read the DICOM image\nds = pydicom.dcmread(image_file)\n\n# Display the DICOM image\nplt.imshow(ds.pixel_array, cmap=plt.cm.bone)\nplt.title(\"DICOM Image\")\nplt.show()\n\n","metadata":{"execution":{"iopub.status.busy":"2023-08-11T06:12:12.733326Z","iopub.execute_input":"2023-08-11T06:12:12.73372Z","iopub.status.idle":"2023-08-11T06:12:13.140636Z","shell.execute_reply.started":"2023-08-11T06:12:12.733691Z","shell.execute_reply":"2023-08-11T06:12:13.139259Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Display the DICOM image\nplt.figure(figsize=(8, 6))\n\nplt.subplot(1, 2, 1)\nplt.imshow(ds.pixel_array, cmap=plt.cm.bone)\nplt.title(\"DICOM Image\")\n\nplt.subplot(1, 2, 2)\nplt.hist(ds.pixel_array.flatten(), bins=50, color='c', alpha=0.7)\nplt.title(\"Pixel Value Histogram\")\n\nplt.tight_layout()\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-08-11T06:14:02.909583Z","iopub.execute_input":"2023-08-11T06:14:02.910014Z","iopub.status.idle":"2023-08-11T06:14:03.742159Z","shell.execute_reply.started":"2023-08-11T06:14:02.909982Z","shell.execute_reply":"2023-08-11T06:14:03.7412Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\n","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}