Skip to content

Instantly share code, notes, and snippets.

@FrederikBussler
Created September 1, 2019 03:25
Show Gist options
  • Save FrederikBussler/eacfe5465a7c2c56d99dff0d8631bd67 to your computer and use it in GitHub Desktop.
Save FrederikBussler/eacfe5465a7c2c56d99dff0d8631bd67 to your computer and use it in GitHub Desktop.
import pandas as pd # get your dependencies
df = pd.read_csv(‘example.csv’) # read the data
df.head(1) # look at the data and make sure you’re changing the right column
df.rename(columns={'oldName': 'newName'}, inplace=True) # rename the column
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment