如何使用mathplotlib或seaborn在条形图上显示标签计数
aap_wise_group_alert.plot(x='Apps/service' , y='AlertCount', kind="barh")
#Filter the Apps/Service data and store in new dataframe
app_wise= df.filter(['Time received','Apps/Service'], axis=1)
app_wise= app_wise.dropna()
#Grouping the columns app_wise
aap_wise_group= app_wise.groupby('Apps/Service')['Time received'].nunique()
aap_wise_group= aap_wise_group.to_frame()
aap_wise_group['Apps/service']=aap_wise_group.index
aap_wise_group=aap_wise_group.reset_index(drop=True)
aap_wise_group.rename(columns={'Time received' : 'AlertCount'}, inplace=True)
aap_wise_group_alert = aap_wise_group.loc[(aap_wise_group['AlertCount'] >=500)]
aap_wise_group_alert.plot(x='Apps/service' , y='AlertCount', kind="barh")