Skip to content

Instantly share code, notes, and snippets.

@naenumtou
Created July 27, 2020 06:47
Show Gist options
  • Save naenumtou/42aff28c26909699f585c92411b46db8 to your computer and use it in GitHub Desktop.
Save naenumtou/42aff28c26909699f585c92411b46db8 to your computer and use it in GitHub Desktop.
std = df.groupby('country').transform(lambda x: (x - x.mean()) / x.std())
std = std['keep1','keep2','keep3']
std = std.add_prefix('std_')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment