Skip to content

Instantly share code, notes, and snippets.

@casarock
Created May 19, 2020 08:06
Show Gist options
  • Save casarock/e78dad0a8d273a8f625dc631456dc843 to your computer and use it in GitHub Desktop.
Save casarock/e78dad0a8d273a8f625dc631456dc843 to your computer and use it in GitHub Desktop.
Cleaning part 2
def clean_Data(self, data_frame, country, drop_columns):
cleaned_data_frame = data_frame.drop(columns=drop_columns)
cleaned_data_frame = cleaned_data_frame.T
cleaned_data_frame['related'] = (100/self.population[country]) * cleaned_data_frame['sum']
return cleaned_data_frame
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment