Skip to content

Instantly share code, notes, and snippets.

@kxzk
Last active August 10, 2019 11:52
Show Gist options
  • Save kxzk/38881f57f76ac21d27ae9aede8193751 to your computer and use it in GitHub Desktop.
Save kxzk/38881f57f76ac21d27ae9aede8193751 to your computer and use it in GitHub Desktop.
# Specify columns, so DataFrame isn't overwritten
df[["first_name", "last_name", "email"]] = df.select_dtypes(
include=["object"]).apply(lambda x: x.str.lower()
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment