Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@srang992
Created September 24, 2022 13:13
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/31b0889062c53f87f40879988e4091e9 to your computer and use it in GitHub Desktop.
Save srang992/31b0889062c53f87f40879988e4091e9 to your computer and use it in GitHub Desktop.
year_count = shark_data['incident_year'].value_counts() \
.rename_axis('incident_year') \
.reset_index(name='count')
kamor_increase = year_count[year_count['incident_year'] >= 1998].sort_values(by='incident_year')
# line plot
plt.figure(figsize=(10,5))
sns.set()
sns.lineplot(x='incident_year', y='count', data=kamor_increase)
plt.xticks(rotation=45)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment