{"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 zipfile\nimport os\nimport pandas as pd\nimport warnings\nwarnings.simplefilter('ignore')","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2023-11-01T03:12:30.736189Z","iopub.execute_input":"2023-11-01T03:12:30.737222Z","iopub.status.idle":"2023-11-01T03:12:30.743241Z","shell.execute_reply.started":"2023-11-01T03:12:30.737179Z","shell.execute_reply":"2023-11-01T03:12:30.741878Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Path to the ZIP file containing the training data\nzip_file_path = '/kaggle/input/ClaimPredictionChallenge/train_set.zip'\n\n# Directory to extract the contents of the ZIP file\nextracted_folder = '/kaggle/working/train_set_extracted'\n\n# Extract the ZIP file\nwith zipfile.ZipFile(zip_file_path, 'r') as zip_ref:\n    zip_ref.extractall(extracted_folder)\n\n# List the extracted files\nextracted_files = os.listdir(extracted_folder)\nprint(extracted_files)\n","metadata":{"execution":{"iopub.status.busy":"2023-11-01T03:06:59.331606Z","iopub.execute_input":"2023-11-01T03:06:59.332818Z","iopub.status.idle":"2023-11-01T03:08:35.141071Z","shell.execute_reply.started":"2023-11-01T03:06:59.332770Z","shell.execute_reply":"2023-11-01T03:08:35.139970Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Find the CSV file \ncsv_file = [file for file in extracted_files if file.endswith('.csv')][0]\n\n# Load the CSV file into a Pandas DataFrame\ntrain_data = pd.read_csv(os.path.join(extracted_folder, csv_file))\n","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(train_data.shape)\ndisplay(train_data.head())\nprint(train_data.columns)","metadata":{"execution":{"iopub.status.busy":"2023-11-01T03:12:30.552588Z","iopub.execute_input":"2023-11-01T03:12:30.553665Z","iopub.status.idle":"2023-11-01T03:12:30.586879Z","shell.execute_reply.started":"2023-11-01T03:12:30.553611Z","shell.execute_reply":"2023-11-01T03:12:30.585730Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(train_data.info())","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}