Introduction to Data Analysis in Python

In [1]:
import pandas as pd

tips = pd.read_csv("https://milliams.com/courses/data_analysis_python/tips.csv")
In [2]:
tips["bill_per_person"] = tips["total_bill"] / tips["size"]
tips["percent_tip"] = (tips["tip"] / tips["total_bill"])*100
In [3]:
import seaborn as sns

sns.relplot(
    data=tips,
    x="bill_per_person",
    y="percent_tip",
    hue="day",
    style="day",
).set(
    xlabel="Bill per person (£)",
    ylabel="Tip percent",
)
Out[3]:
<seaborn.axisgrid.FacetGrid at 0x7f1019192b30>