{ "cells": [ { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Note: you may need to restart the kernel to use updated packages.\n", "Note: you may need to restart the kernel to use updated packages.\n" ] } ], "source": [ "%pip install -q gradio\n", "%pip install -q catboost" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", "import seaborn as sns" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [], "source": [ "sns.set_theme()" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [], "source": [ "df = sns.load_dataset(\"titanic\")" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "survived int64\n", "pclass int64\n", "sex object\n", "age float64\n", "sibsp int64\n", "parch int64\n", "fare float64\n", "embarked object\n", "class category\n", "who object\n", "adult_male bool\n", "deck category\n", "embark_town object\n", "alive object\n", "alone bool\n", "dtype: object" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.dtypes" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| \n", " | survived | \n", "pclass | \n", "sex | \n", "age | \n", "sibsp | \n", "parch | \n", "fare | \n", "embarked | \n", "class | \n", "who | \n", "adult_male | \n", "deck | \n", "embark_town | \n", "alive | \n", "alone | \n", "
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", "0 | \n", "3 | \n", "male | \n", "22.0 | \n", "1 | \n", "0 | \n", "7.2500 | \n", "S | \n", "Third | \n", "man | \n", "True | \n", "NaN | \n", "Southampton | \n", "no | \n", "False | \n", "
| 1 | \n", "1 | \n", "1 | \n", "female | \n", "38.0 | \n", "1 | \n", "0 | \n", "71.2833 | \n", "C | \n", "First | \n", "woman | \n", "False | \n", "C | \n", "Cherbourg | \n", "yes | \n", "False | \n", "