Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created Dec 15, 2020
Embed
What would you like to do?
df = df.rename(columns={'age': 'age',
' workclass': 'workclass',
' fnlwgt': 'final_weight',
' education': 'education',
' education-num': 'education_num',
' marital-status': 'marital_status',
' occupation': 'occupation',
' relationship': 'relationship',
' race': 'race',
' sex': 'sex',
' capital-gain': 'capital_gain',
' capital-loss': 'capital_loss',
' hours-per-week': 'hrs_per_week',
' native-country': 'native_country',
' income': 'income'
})
df.columns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment