{"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":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport matplotlib.pyplot as plt # data visualization\nimport seaborn as sns # data visualization\nimport os \nimport warnings\nwarnings.filterwarnings(\"ignore\")","metadata":{"execution":{"iopub.status.busy":"2022-07-21T19:13:26.574778Z","iopub.execute_input":"2022-07-21T19:13:26.575289Z","iopub.status.idle":"2022-07-21T19:13:27.695026Z","shell.execute_reply.started":"2022-07-21T19:13:26.575160Z","shell.execute_reply":"2022-07-21T19:13:27.693783Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"for dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))","metadata":{"execution":{"iopub.status.busy":"2022-07-21T19:15:04.930813Z","iopub.execute_input":"2022-07-21T19:15:04.931403Z","iopub.status.idle":"2022-07-21T19:15:04.939842Z","shell.execute_reply.started":"2022-07-21T19:15:04.931358Z","shell.execute_reply":"2022-07-21T19:15:04.938531Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def read_data():\n    train_data = pd.read_csv(\"/kaggle/input/titanic/train.csv\")\n    print(\"Train data imported successfully!!\")\n    print(\"-\"*50)\n    test_data = pd.read_csv(\"/kaggle/input/titanic/test.csv\")\n    print(\"Test data imported successfully!!\")\n    return train_data , test_data","metadata":{"execution":{"iopub.status.busy":"2022-07-21T19:15:20.493029Z","iopub.execute_input":"2022-07-21T19:15:20.494160Z","iopub.status.idle":"2022-07-21T19:15:20.499889Z","shell.execute_reply.started":"2022-07-21T19:15:20.494109Z","shell.execute_reply":"2022-07-21T19:15:20.498979Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_data , test_data = read_data()","metadata":{"execution":{"iopub.status.busy":"2022-07-21T19:15:31.160064Z","iopub.execute_input":"2022-07-21T19:15:31.160541Z","iopub.status.idle":"2022-07-21T19:15:31.192162Z","shell.execute_reply.started":"2022-07-21T19:15:31.160502Z","shell.execute_reply":"2022-07-21T19:15:31.190872Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_data.head()","metadata":{"execution":{"iopub.status.busy":"2022-07-21T19:15:43.860309Z","iopub.execute_input":"2022-07-21T19:15:43.860759Z","iopub.status.idle":"2022-07-21T19:15:43.892291Z","shell.execute_reply.started":"2022-07-21T19:15:43.860723Z","shell.execute_reply":"2022-07-21T19:15:43.891130Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_data.info()","metadata":{"execution":{"iopub.status.busy":"2022-07-21T19:15:55.290644Z","iopub.execute_input":"2022-07-21T19:15:55.291063Z","iopub.status.idle":"2022-07-21T19:15:55.318578Z","shell.execute_reply.started":"2022-07-21T19:15:55.291030Z","shell.execute_reply":"2022-07-21T19:15:55.317638Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_data.describe()","metadata":{"execution":{"iopub.status.busy":"2022-07-21T19:21:03.975317Z","iopub.execute_input":"2022-07-21T19:21:03.975750Z","iopub.status.idle":"2022-07-21T19:21:04.012807Z","shell.execute_reply.started":"2022-07-21T19:21:03.975715Z","shell.execute_reply":"2022-07-21T19:21:04.011659Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_data.isnull()","metadata":{"execution":{"iopub.status.busy":"2022-07-21T19:21:50.211147Z","iopub.execute_input":"2022-07-21T19:21:50.211581Z","iopub.status.idle":"2022-07-21T19:21:50.238728Z","shell.execute_reply.started":"2022-07-21T19:21:50.211543Z","shell.execute_reply":"2022-07-21T19:21:50.237639Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_data.isnull().count()","metadata":{"execution":{"iopub.status.busy":"2022-07-21T19:22:11.330468Z","iopub.execute_input":"2022-07-21T19:22:11.330932Z","iopub.status.idle":"2022-07-21T19:22:11.345571Z","shell.execute_reply.started":"2022-07-21T19:22:11.330895Z","shell.execute_reply":"2022-07-21T19:22:11.344180Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}