Skip to content

Instantly share code, notes, and snippets.

@srang992
Created September 24, 2022 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srang992/d1281b7dfbf76a71c10fc99001de50fd to your computer and use it in GitHub Desktop.
Save srang992/d1281b7dfbf76a71c10fc99001de50fd to your computer and use it in GitHub Desktop.
shark_incident_count = shark_data['shark_common_name'].value_counts() \
.rename_axis('shark_common_name') \
.reset_index(name='count')
second_shark = shark_incident_count[shark_incident_count['count'] >= 10]
sns.barplot(x='shark_common_name', y='count', data=second_shark)
plt.xticks(rotation=45)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment