Skip to content

Instantly share code, notes, and snippets.

@shanealynn
Last active October 6, 2016 23:15
Show Gist options
  • Save shanealynn/1c30da11d88cba2ecdf3936209a981b9 to your computer and use it in GitHub Desktop.
Save shanealynn/1c30da11d88cba2ecdf3936209a981b9 to your computer and use it in GitHub Desktop.
# Change the first name of all rows with an ID greater than 2000 to "John"
data.loc[data['id'] > 2000, "first_name"] = "John"
# Change the first name of all rows with an ID greater than 2000 to "John"
data.loc[data['id'] > 2000, "first_name"] = "John"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment