Answers for "box plot python"

0

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)
Posted by: Guest on May-22-2021
0

python boxplot show mean

import matplotlib.pyplot as plt
import numpy as np

data_to_plot = np.random.rand(100,5)

fig = plt.figure(1, figsize=(9, 6))
ax = fig.add_subplot(111)    
bp = ax.boxplot(data_to_plot, showmeans=True)

plt.show()
Posted by: Guest on August-05-2020
0

seaborn orient

>>> import seaborn as sns
>>> sns.set_theme(style="whitegrid")
>>> tips = sns.load_dataset("tips")
>>> ax = sns.boxplot(x=tips["total_bill"])
Posted by: Guest on December-04-2020

Python Answers by Framework

Browse Popular Code Answers by Language