{"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 seaborn as sns\n\ntitanic=sns.load_dataset('titanic')\ntitanic.head()","metadata":{"execution":{"iopub.status.busy":"2022-07-16T09:48:44.905243Z","iopub.execute_input":"2022-07-16T09:48:44.906122Z","iopub.status.idle":"2022-07-16T09:48:47.314197Z","shell.execute_reply.started":"2022-07-16T09:48:44.906013Z","shell.execute_reply":"2022-07-16T09:48:47.312827Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.histplot(data=titanic, x='age',bins=10);","metadata":{"execution":{"iopub.status.busy":"2022-07-16T09:50:34.002990Z","iopub.execute_input":"2022-07-16T09:50:34.003378Z","iopub.status.idle":"2022-07-16T09:50:34.233793Z","shell.execute_reply.started":"2022-07-16T09:50:34.003347Z","shell.execute_reply":"2022-07-16T09:50:34.232669Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.histplot(data=titanic, x='age',hue='alive',multiple='stack');","metadata":{"execution":{"iopub.status.busy":"2022-07-16T09:51:36.502199Z","iopub.execute_input":"2022-07-16T09:51:36.502586Z","iopub.status.idle":"2022-07-16T09:51:36.827713Z","shell.execute_reply.started":"2022-07-16T09:51:36.502551Z","shell.execute_reply":"2022-07-16T09:51:36.826644Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.kdeplot(data=titanic, x='age',hue='alive',multiple='stack');","metadata":{"execution":{"iopub.status.busy":"2022-07-16T09:54:05.552153Z","iopub.execute_input":"2022-07-16T09:54:05.552579Z","iopub.status.idle":"2022-07-16T09:54:05.930064Z","shell.execute_reply.started":"2022-07-16T09:54:05.552543Z","shell.execute_reply":"2022-07-16T09:54:05.928825Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.displot(data=titanic, x='age',kde=True);","metadata":{"execution":{"iopub.status.busy":"2022-07-16T09:56:31.684174Z","iopub.execute_input":"2022-07-16T09:56:31.684568Z","iopub.status.idle":"2022-07-16T09:56:32.007817Z","shell.execute_reply.started":"2022-07-16T09:56:31.684535Z","shell.execute_reply":"2022-07-16T09:56:32.006681Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.kdeplot(data=titanic, x='age')\nsns.rugplot(data=titanic, x='age');","metadata":{"execution":{"iopub.status.busy":"2022-07-16T10:29:12.120424Z","iopub.execute_input":"2022-07-16T10:29:12.121665Z","iopub.status.idle":"2022-07-16T10:29:12.370500Z","shell.execute_reply.started":"2022-07-16T10:29:12.121610Z","shell.execute_reply":"2022-07-16T10:29:12.369419Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import seaborn as sns\n\ntitanic=sns.load_dataset('titanic')","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.barplot(x='class',y='fare',data=titanic);","metadata":{"execution":{"iopub.status.busy":"2022-07-16T10:30:46.100651Z","iopub.execute_input":"2022-07-16T10:30:46.101113Z","iopub.status.idle":"2022-07-16T10:30:46.366719Z","shell.execute_reply.started":"2022-07-16T10:30:46.101075Z","shell.execute_reply":"2022-07-16T10:30:46.365528Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.pointplot(x='class',y='fare',data=titanic);","metadata":{"execution":{"iopub.status.busy":"2022-07-16T10:32:07.649755Z","iopub.execute_input":"2022-07-16T10:32:07.650266Z","iopub.status.idle":"2022-07-16T10:32:07.940140Z","shell.execute_reply.started":"2022-07-16T10:32:07.650227Z","shell.execute_reply":"2022-07-16T10:32:07.938912Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.boxplot(x='class',y='fare',data=titanic);","metadata":{"execution":{"iopub.status.busy":"2022-07-16T10:33:19.097756Z","iopub.execute_input":"2022-07-16T10:33:19.098129Z","iopub.status.idle":"2022-07-16T10:33:19.291847Z","shell.execute_reply.started":"2022-07-16T10:33:19.098099Z","shell.execute_reply":"2022-07-16T10:33:19.290684Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.violinplot(x='class',y='fare',data=titanic)","metadata":{"execution":{"iopub.status.busy":"2022-07-16T10:34:23.119319Z","iopub.execute_input":"2022-07-16T10:34:23.120096Z","iopub.status.idle":"2022-07-16T10:34:23.341999Z","shell.execute_reply.started":"2022-07-16T10:34:23.120016Z","shell.execute_reply":"2022-07-16T10:34:23.340890Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.violinplot(x='class',y='fare',hue='sex',data=titanic,split=True);","metadata":{"execution":{"iopub.status.busy":"2022-07-16T10:35:37.048713Z","iopub.execute_input":"2022-07-16T10:35:37.049822Z","iopub.status.idle":"2022-07-16T10:35:37.316282Z","shell.execute_reply.started":"2022-07-16T10:35:37.049770Z","shell.execute_reply":"2022-07-16T10:35:37.315154Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.countplot(x='class',data=titanic)","metadata":{"execution":{"iopub.status.busy":"2022-07-16T10:39:19.947941Z","iopub.execute_input":"2022-07-16T10:39:19.948945Z","iopub.status.idle":"2022-07-16T10:39:20.064120Z","shell.execute_reply.started":"2022-07-16T10:39:19.948904Z","shell.execute_reply":"2022-07-16T10:39:20.062855Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.countplot(y='class',data=titanic)","metadata":{"execution":{"iopub.status.busy":"2022-07-16T10:39:54.108150Z","iopub.execute_input":"2022-07-16T10:39:54.108835Z","iopub.status.idle":"2022-07-16T10:39:54.270751Z","shell.execute_reply.started":"2022-07-16T10:39:54.108795Z","shell.execute_reply":"2022-07-16T10:39:54.269612Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import matplotlib.pyplot as plt\n\nx=[10,60,30]\nlabels=['A','B','C']\n\nplt.pie(x=x, labels=labels, autopct='%.1f%%')","metadata":{"execution":{"iopub.status.busy":"2022-07-16T10:43:30.092483Z","iopub.execute_input":"2022-07-16T10:43:30.092924Z","iopub.status.idle":"2022-07-16T10:43:30.188219Z","shell.execute_reply.started":"2022-07-16T10:43:30.092887Z","shell.execute_reply":"2022-07-16T10:43:30.186680Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import seaborn as sns\n\nflights=sns.load_dataset('flights')\nflights.head()","metadata":{"execution":{"iopub.status.busy":"2022-07-16T10:44:43.200068Z","iopub.execute_input":"2022-07-16T10:44:43.200888Z","iopub.status.idle":"2022-07-16T10:44:44.087899Z","shell.execute_reply.started":"2022-07-16T10:44:43.200849Z","shell.execute_reply":"2022-07-16T10:44:44.086759Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"flights_pivot=flights.pivot(index='month',columns='year',values='passengers')\nflights_pivot","metadata":{"execution":{"iopub.status.busy":"2022-07-16T10:46:33.414780Z","iopub.execute_input":"2022-07-16T10:46:33.415245Z","iopub.status.idle":"2022-07-16T10:46:33.436618Z","shell.execute_reply.started":"2022-07-16T10:46:33.415206Z","shell.execute_reply":"2022-07-16T10:46:33.435628Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.heatmap(data=flights_pivot)","metadata":{"execution":{"iopub.status.busy":"2022-07-16T10:47:29.351343Z","iopub.execute_input":"2022-07-16T10:47:29.352108Z","iopub.status.idle":"2022-07-16T10:47:29.682689Z","shell.execute_reply.started":"2022-07-16T10:47:29.352068Z","shell.execute_reply":"2022-07-16T10:47:29.681638Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.lineplot(x='year', y='passengers',data=flights);","metadata":{"execution":{"iopub.status.busy":"2022-07-16T10:48:22.403370Z","iopub.execute_input":"2022-07-16T10:48:22.403874Z","iopub.status.idle":"2022-07-16T10:48:22.975140Z","shell.execute_reply.started":"2022-07-16T10:48:22.403834Z","shell.execute_reply":"2022-07-16T10:48:22.973953Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tips=sns.load_dataset('tips')\ntips.head()","metadata":{"execution":{"iopub.status.busy":"2022-07-16T10:49:22.070214Z","iopub.execute_input":"2022-07-16T10:49:22.070682Z","iopub.status.idle":"2022-07-16T10:49:22.093639Z","shell.execute_reply.started":"2022-07-16T10:49:22.070641Z","shell.execute_reply":"2022-07-16T10:49:22.092377Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.scatterplot(x='total_bill', y='tip',hue='time', data=tips);","metadata":{"execution":{"iopub.status.busy":"2022-07-16T10:51:38.952995Z","iopub.execute_input":"2022-07-16T10:51:38.953793Z","iopub.status.idle":"2022-07-16T10:51:39.149137Z","shell.execute_reply.started":"2022-07-16T10:51:38.953744Z","shell.execute_reply":"2022-07-16T10:51:39.146751Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.regplot(x='total_bill',y='tip', ci=99, data=tips);","metadata":{"execution":{"iopub.status.busy":"2022-07-16T10:53:46.187965Z","iopub.execute_input":"2022-07-16T10:53:46.188362Z","iopub.status.idle":"2022-07-16T10:53:46.483171Z","shell.execute_reply.started":"2022-07-16T10:53:46.188325Z","shell.execute_reply":"2022-07-16T10:53:46.482217Z"},"trusted":true},"execution_count":null,"outputs":[]}]}