Skip to content

Instantly share code, notes, and snippets.

@casarock
Last active May 19, 2020 07:18
Show Gist options
  • Save casarock/711c7f56f915820c9cb03eb17988d6ae to your computer and use it in GitHub Desktop.
Save casarock/711c7f56f915820c9cb03eb17988d6ae to your computer and use it in GitHub Desktop.
Clean bot data
def get_clean_data(self):
df = pd.read_csv(self.csv_url)
df = df.drop(columns=['Lat', 'Long'])
df_group = df.groupby(['Country/Region'])
germany = df_group.get_group('Germany')
overall = df.agg(['sum'])
germany = germany.agg(['sum'])
self.overall = self.clean_Data(overall, 'overall', ['Country/Region'])
self.germany = self.clean_Data(germany, 'germany', ['Province/State', 'Country/Region'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment