{"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","execution":{"iopub.status.busy":"2022-08-26T09:12:09.898052Z","iopub.execute_input":"2022-08-26T09:12:09.89853Z","iopub.status.idle":"2022-08-26T09:12:10.066098Z","shell.execute_reply.started":"2022-08-26T09:12:09.898438Z","shell.execute_reply":"2022-08-26T09:12:10.064911Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train= pd.read_csv('/kaggle/input/mayo-clinic-strip-ai/train.csv')\ndf_train.head(5)","metadata":{"execution":{"iopub.status.busy":"2022-08-26T09:13:28.468382Z","iopub.execute_input":"2022-08-26T09:13:28.468812Z","iopub.status.idle":"2022-08-26T09:13:28.497461Z","shell.execute_reply.started":"2022-08-26T09:13:28.468778Z","shell.execute_reply":"2022-08-26T09:13:28.49652Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_other= pd.read_csv('/kaggle/input/mayo-clinic-strip-ai/other.csv')\ndf_other.head(5)","metadata":{"execution":{"iopub.status.busy":"2022-08-26T09:14:15.44233Z","iopub.execute_input":"2022-08-26T09:14:15.443581Z","iopub.status.idle":"2022-08-26T09:14:15.46505Z","shell.execute_reply.started":"2022-08-26T09:14:15.443528Z","shell.execute_reply":"2022-08-26T09:14:15.463825Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train.isnull().sum().sort_values(ascending=False)","metadata":{"execution":{"iopub.status.busy":"2022-08-26T09:14:52.870446Z","iopub.execute_input":"2022-08-26T09:14:52.870853Z","iopub.status.idle":"2022-08-26T09:14:52.882857Z","shell.execute_reply.started":"2022-08-26T09:14:52.870822Z","shell.execute_reply":"2022-08-26T09:14:52.881825Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_other.isnull().sum().sort_values(ascending=False)","metadata":{"execution":{"iopub.status.busy":"2022-08-26T09:15:24.07426Z","iopub.execute_input":"2022-08-26T09:15:24.074829Z","iopub.status.idle":"2022-08-26T09:15:24.086221Z","shell.execute_reply.started":"2022-08-26T09:15:24.074781Z","shell.execute_reply":"2022-08-26T09:15:24.085314Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_other['other_specified'].value_counts()","metadata":{"execution":{"iopub.status.busy":"2022-08-26T09:16:02.653695Z","iopub.execute_input":"2022-08-26T09:16:02.654434Z","iopub.status.idle":"2022-08-26T09:16:02.666978Z","shell.execute_reply.started":"2022-08-26T09:16:02.654369Z","shell.execute_reply":"2022-08-26T09:16:02.66577Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_other['other_specified'].fillna(df_other['other_specified'].mode()[0], inplace=True)","metadata":{"execution":{"iopub.status.busy":"2022-08-26T09:17:03.558897Z","iopub.execute_input":"2022-08-26T09:17:03.560171Z","iopub.status.idle":"2022-08-26T09:17:03.570292Z","shell.execute_reply.started":"2022-08-26T09:17:03.560117Z","shell.execute_reply":"2022-08-26T09:17:03.568968Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"duplicate=df_other.duplicated()\nprint(duplicate.sum())\ndf_other[duplicate]","metadata":{"execution":{"iopub.status.busy":"2022-08-26T09:19:53.352488Z","iopub.execute_input":"2022-08-26T09:19:53.353572Z","iopub.status.idle":"2022-08-26T09:19:53.371988Z","shell.execute_reply.started":"2022-08-26T09:19:53.353523Z","shell.execute_reply":"2022-08-26T09:19:53.371165Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import matplotlib.pyplot as plt\n\n%matplotlib inline\nimport seaborn as sns","metadata":{"execution":{"iopub.status.busy":"2022-08-26T09:20:51.238893Z","iopub.execute_input":"2022-08-26T09:20:51.239371Z","iopub.status.idle":"2022-08-26T09:20:51.763154Z","shell.execute_reply.started":"2022-08-26T09:20:51.239333Z","shell.execute_reply":"2022-08-26T09:20:51.762021Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(15,7))\ndf_other['label'].value_counts().plot(kind='pie',explode=(0,0.1),autopct='%1.1f%%',fontsize=14)","metadata":{"execution":{"iopub.status.busy":"2022-08-26T09:21:00.511406Z","iopub.execute_input":"2022-08-26T09:21:00.512677Z","iopub.status.idle":"2022-08-26T09:21:00.661999Z","shell.execute_reply.started":"2022-08-26T09:21:00.512625Z","shell.execute_reply":"2022-08-26T09:21:00.66048Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(15,7))\ndf_other['other_specified'].value_counts().plot(kind='bar')","metadata":{"execution":{"iopub.status.busy":"2022-08-26T09:22:50.209011Z","iopub.execute_input":"2022-08-26T09:22:50.209438Z","iopub.status.idle":"2022-08-26T09:22:50.485058Z","shell.execute_reply.started":"2022-08-26T09:22:50.209364Z","shell.execute_reply":"2022-08-26T09:22:50.483733Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train.head()","metadata":{"execution":{"iopub.status.busy":"2022-08-26T09:23:26.552067Z","iopub.execute_input":"2022-08-26T09:23:26.552562Z","iopub.status.idle":"2022-08-26T09:23:26.565703Z","shell.execute_reply.started":"2022-08-26T09:23:26.552524Z","shell.execute_reply":"2022-08-26T09:23:26.564548Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train['label'].value_counts().plot(kind='bar',figsize=(15,7))","metadata":{"execution":{"iopub.status.busy":"2022-08-26T09:24:11.470564Z","iopub.execute_input":"2022-08-26T09:24:11.471246Z","iopub.status.idle":"2022-08-26T09:24:11.695986Z","shell.execute_reply.started":"2022-08-26T09:24:11.471192Z","shell.execute_reply":"2022-08-26T09:24:11.694862Z"},"trusted":true},"execution_count":null,"outputs":[]}]}