ax = df_1['neighbourhood'].value_counts().plot(kind='bar', figsize=(14,8),
title="Neighbourhood that showed")
ax.set_xlabel("neighboorhood")
ax.set_ylabel("Frequency")
答案 0 :(得分:0)
您可以将value_counts()
的结果分配给一个Series并按以下方式对其进行过滤:
count = df_1['neighbourhood'].value_counts()
ax = count[count > 2000].plot(kind='bar', figsize=(14,8), title="Neighbourhood that showed")
ax.set_xlabel("neighboorhood")
ax.set_ylabel("Frequency")