# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# + deletable=true editable=true slideshow={"slide_type": "skip"} language="html"
# <style>
# .output_wrapper, .output {
#     height:auto !important;
#     max-height:450px;  /* your desired max-height here */
# }
# .output_scroll {
#     box-shadow:none !important;
#     webkit-box-shadow:none !important;
# }
# </style>

# + deletable=true editable=true slideshow={"slide_type": "skip"}
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"

# + [markdown] deletable=true editable=true slideshow={"slide_type": "slide"}
# ### Import Modules

# + deletable=true editable=true slideshow={"slide_type": "fragment"}
import pandas as pd
from matplotlib import pyplot as plt
# %matplotlib inline
import seaborn as sns

# + [markdown] deletable=true editable=true slideshow={"slide_type": "slide"}
# ### The dataset

# + deletable=true editable=true slideshow={"slide_type": "fragment"}
df = pd.read_csv('data_simpsons_episodes.csv')
df.head()

# + [markdown] deletable=true editable=true slideshow={"slide_type": "slide"}
# ### Scatterplots

# + deletable=true editable=true slideshow={"slide_type": "fragment"}
sns.stripplot(x="season", y="us_viewers_in_millions", data=df);

# + [markdown] deletable=true editable=true slideshow={"slide_type": "slide"}
# ### Swarmplot

# + deletable=true editable=true slideshow={"slide_type": "fragment"}
sns.swarmplot(x="season", y="us_viewers_in_millions", data=df);

# + [markdown] deletable=true editable=true slideshow={"slide_type": "slide"}
# ### Boxplot

# + deletable=true editable=true slideshow={"slide_type": "fragment"}
sns.boxplot(x="season", y="us_viewers_in_millions", data=df);

# + [markdown] deletable=true editable=true slideshow={"slide_type": "slide"}
# ### Violinplot

# + deletable=true editable=true slideshow={"slide_type": "fragment"}
sns.violinplot(x="season", y="us_viewers_in_millions", data=df);

# + [markdown] deletable=true editable=true slideshow={"slide_type": "slide"}
# ### Barplot

# + deletable=true editable=true slideshow={"slide_type": "fragment"}
sns.barplot(x="season", y="us_viewers_in_millions", data=df);

# + deletable=true editable=true slideshow={"slide_type": "slide"}
sns.countplot(x="season", data=df);

# + [markdown] deletable=true editable=true slideshow={"slide_type": "slide"}
# ### Wide form plots

# + deletable=true editable=true slideshow={"slide_type": "slide"}
df = pd.read_csv('data-alcohol.csv')
df.head()

# + slideshow={"slide_type": "slide"}
sns.boxplot(data=df, orient="h");

# + slideshow={"slide_type": "skip"}


StarcoderdataJupyterScriptsDedupFiltered