How to add a filter/query/condition in Plotly
Assuming your DataFrame is rwgor, you need to filter it like this:
rwgor = rwgor.loc[rwgor.attractionName &gt;=165]
fig = px.bar(rwgor, x=&quot;attractionName&quot;, y=&quot;attraction score summary&quot;, color=&quot;attraction score summary&quot;, title=&quot;Long-Form Input&quot;)
fig.show()

or
fig = px.bar(rwgor.loc[rwgor.attractionName &gt;=165], x=&quot;attractionName&quot;, y=&quot;attraction score summary&quot;, color=&quot;attraction score summary&quot;, title=&quot;Long-Form Input&quot;)
fig.show()

Finally, note that I used rwgor.attractionName &gt;=165 and not rwgor.attractionName.value_counts() &gt;=165, according your plot description.