{"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":"markdown","source":"# **American Express**","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19"}},{"cell_type":"code","source":"import numpy as np \nimport pandas as pd \nimport seaborn as sns\nimport matplotlib as plt","metadata":{"execution":{"iopub.status.busy":"2022-11-08T10:31:13.999531Z","iopub.execute_input":"2022-11-08T10:31:14.000050Z","iopub.status.idle":"2022-11-08T10:31:14.634769Z","shell.execute_reply.started":"2022-11-08T10:31:14.000010Z","shell.execute_reply":"2022-11-08T10:31:14.633855Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df=pd.read_csv(\"../input/amex-default-prediction/train_data.csv\", nrows=200)","metadata":{"execution":{"iopub.status.busy":"2022-11-08T10:32:08.413944Z","iopub.execute_input":"2022-11-08T10:32:08.414390Z","iopub.status.idle":"2022-11-08T10:32:08.460876Z","shell.execute_reply.started":"2022-11-08T10:32:08.414353Z","shell.execute_reply":"2022-11-08T10:32:08.459676Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df","metadata":{"execution":{"iopub.status.busy":"2022-11-08T10:32:16.698048Z","iopub.execute_input":"2022-11-08T10:32:16.698498Z","iopub.status.idle":"2022-11-08T10:32:16.742300Z","shell.execute_reply.started":"2022-11-08T10:32:16.698460Z","shell.execute_reply":"2022-11-08T10:32:16.741008Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Two numerical columns\ndf.plot(x='D_39', y='P_2', style='o')","metadata":{"execution":{"iopub.status.busy":"2022-11-08T10:35:33.966430Z","iopub.execute_input":"2022-11-08T10:35:33.966883Z","iopub.status.idle":"2022-11-08T10:35:34.197847Z","shell.execute_reply.started":"2022-11-08T10:35:33.966846Z","shell.execute_reply":"2022-11-08T10:35:34.196478Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#One numerical and one categorical\ndf.plot(x='customer_ID', y='P_2',style='*')","metadata":{"execution":{"iopub.status.busy":"2022-11-08T10:41:54.935314Z","iopub.execute_input":"2022-11-08T10:41:54.936446Z","iopub.status.idle":"2022-11-08T10:41:55.253059Z","shell.execute_reply.started":"2022-11-08T10:41:54.936396Z","shell.execute_reply":"2022-11-08T10:41:55.251443Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Two numerical and one categorical\ndf.plot(x=\"S_2\", y=[\"P_2\", \"B_1\"],style='o')\n","metadata":{"execution":{"iopub.status.busy":"2022-11-08T10:48:36.700789Z","iopub.execute_input":"2022-11-08T10:48:36.701272Z","iopub.status.idle":"2022-11-08T10:48:36.965322Z","shell.execute_reply.started":"2022-11-08T10:48:36.701220Z","shell.execute_reply":"2022-11-08T10:48:36.964148Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Check null values in a column.\ndf['D_39'].isnull()","metadata":{"execution":{"iopub.status.busy":"2022-11-08T10:51:57.749847Z","iopub.execute_input":"2022-11-08T10:51:57.750303Z","iopub.status.idle":"2022-11-08T10:51:57.760941Z","shell.execute_reply.started":"2022-11-08T10:51:57.750259Z","shell.execute_reply":"2022-11-08T10:51:57.759543Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Check the cardinality of a categorical column.\ndf['D_63'].nunique()","metadata":{"execution":{"iopub.status.busy":"2022-11-08T10:53:27.508316Z","iopub.execute_input":"2022-11-08T10:53:27.508884Z","iopub.status.idle":"2022-11-08T10:53:27.518879Z","shell.execute_reply.started":"2022-11-08T10:53:27.508833Z","shell.execute_reply":"2022-11-08T10:53:27.517324Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# **Titanic Disaster**","metadata":{}},{"cell_type":"code","source":"import numpy as np \nimport pandas as pd \nimport matplotlib as plt","metadata":{"execution":{"iopub.status.busy":"2022-11-08T10:54:56.381407Z","iopub.execute_input":"2022-11-08T10:54:56.381809Z","iopub.status.idle":"2022-11-08T10:54:56.387512Z","shell.execute_reply.started":"2022-11-08T10:54:56.381778Z","shell.execute_reply":"2022-11-08T10:54:56.386319Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df=pd.read_csv(\"../input/titanic/train.csv\")","metadata":{"execution":{"iopub.status.busy":"2022-11-08T10:55:58.027081Z","iopub.execute_input":"2022-11-08T10:55:58.027539Z","iopub.status.idle":"2022-11-08T10:55:58.039687Z","shell.execute_reply.started":"2022-11-08T10:55:58.027498Z","shell.execute_reply":"2022-11-08T10:55:58.038497Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.head()","metadata":{"execution":{"iopub.status.busy":"2022-11-08T11:03:03.725483Z","iopub.execute_input":"2022-11-08T11:03:03.725929Z","iopub.status.idle":"2022-11-08T11:03:03.746784Z","shell.execute_reply.started":"2022-11-08T11:03:03.725891Z","shell.execute_reply":"2022-11-08T11:03:03.745316Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.plot(x='PassengerId', y='Pclass',style=\"o\")","metadata":{"execution":{"iopub.status.busy":"2022-11-08T11:00:44.643492Z","iopub.execute_input":"2022-11-08T11:00:44.643952Z","iopub.status.idle":"2022-11-08T11:00:44.854442Z","shell.execute_reply.started":"2022-11-08T11:00:44.643910Z","shell.execute_reply":"2022-11-08T11:00:44.853467Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.plot(x='Name', y='Age', style='*')","metadata":{"execution":{"iopub.status.busy":"2022-11-08T11:07:00.813327Z","iopub.execute_input":"2022-11-08T11:07:00.813762Z","iopub.status.idle":"2022-11-08T11:07:01.015334Z","shell.execute_reply.started":"2022-11-08T11:07:00.813725Z","shell.execute_reply":"2022-11-08T11:07:01.013557Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.plot(x=\"Sex\", y=[\"PassengerId\", \"Survived\"],style='o')","metadata":{"execution":{"iopub.status.busy":"2022-11-08T11:12:14.840583Z","iopub.execute_input":"2022-11-08T11:12:14.841078Z","iopub.status.idle":"2022-11-08T11:12:15.024762Z","shell.execute_reply.started":"2022-11-08T11:12:14.841038Z","shell.execute_reply":"2022-11-08T11:12:15.023348Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['Cabin'].isnull()","metadata":{"execution":{"iopub.status.busy":"2022-11-08T11:15:30.393400Z","iopub.execute_input":"2022-11-08T11:15:30.393857Z","iopub.status.idle":"2022-11-08T11:15:30.403946Z","shell.execute_reply.started":"2022-11-08T11:15:30.393814Z","shell.execute_reply":"2022-11-08T11:15:30.402620Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['Pclass'].nunique()","metadata":{"execution":{"iopub.status.busy":"2022-11-08T11:16:15.450180Z","iopub.execute_input":"2022-11-08T11:16:15.450650Z","iopub.status.idle":"2022-11-08T11:16:15.461075Z","shell.execute_reply.started":"2022-11-08T11:16:15.450611Z","shell.execute_reply":"2022-11-08T11:16:15.459807Z"},"trusted":true},"execution_count":null,"outputs":[]}]}