我的数据框看起来像-
age_binned is_active count
(15, 22] 0 22
(15, 22] 1 34
(22, 30] 0 3
(22, 30] 1 81
(30, 40] 0 26
(30, 40] 1 10
(40, 55] 0 13
(40, 55] 1 69
(55, 65] 0 28
(55, 65] 1 14
(65, 75] 0 52
(65, 75] 1 49
我想要基于“ is_active”成员的分组条形图。我的分类变量是“ age_binned”。此外,每个栏的顶部都希望显示实际编号。
我到目前为止已完成-
df_age.plot(x="age_binned", y=["count"], kind="bar")
但无法获得分组的条形图和值