Answers for "add values to pandas plot"

0

add values to pandas plot

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)
Posted by: Guest on July-01-2021

Python Answers by Framework

Browse Popular Code Answers by Language