📜  向熊猫图添加值 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:24.245000             🧑  作者: Mango

代码示例1
df = pd.DataFrame({'A': np.random.rand(2), 'B': np.random.rand(2)}, index=['value1', 'value2'])
ax = df.plot.bar()

for container in ax.containers:
    ax.bar_label(container)