Python 创建区显示的计数不正确

Python 创建区显示的计数不正确,python,pandas,plot,Python,Pandas,Plot,这是我的代码: import plotly.figure_factory as ff df["date"] = df.timestamp.dt.date bar = df.loc[df.date == pd.to_datetime("2020-08-18")] bar["hours"] = bar.timestamp.dt.hour bar["id"] = bar.groupby('timestamp').ngrou

这是我的代码:

import plotly.figure_factory as ff
df["date"] = df.timestamp.dt.date
bar = df.loc[df.date == pd.to_datetime("2020-08-18")]
bar["hours"] = bar.timestamp.dt.hour
bar["id"] = bar.groupby('timestamp').ngroup()+1
fig =  ff.create_distplot([bar.id],['frequency'])
fig.show()
为每个相同的时间戳分配一个新id。我需要计算这些ID的频率。问题是它显示的计数如下:

而频率在0-100之间。如何显示当前频率