box plot in python code example
Example 1: box plot python code
import pandas as pd
import matplotlib.pyplot as plt
% matplotlib inline
# load the dataset
df = pd.read_csv("tips.csv")
# display 5 rows of dataset
print(df.head())
df.boxplot(by ='day', column =['total_bill'], grid = False)
Example 2: sns.boxplot code
sns.boxplot("var")
Example 3: seaborn orient
>>> import seaborn as sns
>>> sns.set_theme(style="whitegrid")
>>> tips = sns.load_dataset("tips")
>>> ax = sns.boxplot(x=tips["total_bill"])