0

Is is possible to add bar values to a pandas groupby plot?

df.groupby("Responded Year-Month")["Net New Record"].value_counts().unstack(level=1).plot.bar(
    stacked=True,
    title="Responses by Month & Net New Record",
    ylabel="Responses",
    xlabel="Month",
    rot=0,
    color=nnr_colors)

I checked the docs and could not find any reference of values in the bars both the df.plot.bar docs and the df.plot docs.

As an example, it is very easy to accomplish something similar with a pie plot using autopct:

df.groupby("Channel")["Responded"].sum().plot.pie(
    autopct='%1.0f%%', 
    title="Responses by Channel"
    )

0 Answers0