Skip to content

Instantly share code, notes, and snippets.

@vallantin
Last active August 15, 2018 19:47
Show Gist options
  • Save vallantin/b6bf35de026ccb27f7c11cb3678040b7 to your computer and use it in GitHub Desktop.
Save vallantin/b6bf35de026ccb27f7c11cb3678040b7 to your computer and use it in GitHub Desktop.
Given a data frame, replace all values on a column by 'Other' except the 2 most frequent ones
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment