Created
September 24, 2022 13:13
-
-
Save srang992/31b0889062c53f87f40879988e4091e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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