Show the rendering first.
Use the new bar_label function in matplotlib version 3.4. The specific code is as follows:
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
sns.set_theme(style="whitegrid")
sns.set_style('darkgrid')
sns.set(rc={
'figure.figsize':(9,4.5)}) # 设置图片宽高
# 准备数据
x = ['c1', 'c2', 'c3', 'c4', 'c5', 'c6', 'c7', 'c8', 'c9']
y = [230, 856, 309, 500, 10000, 5000, 205, 366, 1484]
pd = pd.DataFrame({
"Column": x, "Number": y})
# 绘图
fig = sns.barplot(data=pd, x="Column", y="Number")
fig.bar_label(fig.containers[0]); # 只有一组柱状图的情况
plt.show()