larken

勤奋的人生才有价值

导航

111

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from pylab import *

rcParams['axes.unicode_minus'] = False
rcParams['font.sans-serif'] = ['Simhei']

data = {"B":[1,2,3,4,5,6,7,8,10],
"C":[1,2,3,10,5,6,7,8,15],
"D":[1,8,3,4,5,6,7,8,12],
"E":[1,13,3,4,5,6,11,8,9]}

df = pd.DataFrame(data)

df.plot.box()

plt.xlabel("横轴",fontsize=16)

plt.ylabel('纵轴',fontsize=16)
plt.grid(linestyle="--", alpha=0.8)

print(df.describe())#显示中位数、上下四分位数、标准偏差等内容

plt.show()

posted on 2022-03-29 10:06  larken  阅读(410)  评论(0编辑  收藏  举报