9/19/24, 12:26 PM Untitled24 - Jupyter Notebook
In [8]: import seaborn as sns
import [Link] as plt
In [9]: import pandas as pd
In [11]: #load the exaple dataset
tips = sns.load_dataset("tips")
In [12]: #problem 1:create a scatter plot to show the relation total bill and tips
In [21]: [Link](figsize=(10,5))
[Link](data=tips,x='total_bill', y='tip', hue='day', style='sex',
palette='deep')
[Link]('scatter plot of total bill vs tip')
[Link]('total bill ($)')
[Link]('tip($)')
[Link](title='day and sex')
[Link]()
localhost:8888/notebooks/[Link]?kernel_name=python3 1/3
9/19/24, 12:26 PM Untitled24 - Jupyter Notebook
In [27]: # problem 2:create a bar plot to show the distraction of tips by time (lunch
[Link](figsize=(10,5))
[Link](data=tips, x='time', y='tip')
[Link]('box plot of tips by time')
[Link]('time of days')
[Link]('tip($)')
[Link]()
In [29]: #plm3
[Link](figsize=(10,5))
[Link](data=tips, x='time', y='tip')
[Link]('box plot of tips by time')
[Link]('time of days')
[Link]('tip ($)')
[Link]()
In [ ]:
localhost:8888/notebooks/[Link]?kernel_name=python3 2/3
9/19/24, 12:26 PM Untitled24 - Jupyter Notebook
localhost:8888/notebooks/[Link]?kernel_name=python3 3/3