Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas description of dataframe renaming column values

	dict = {
    'Android': 'Android',
    'Chrome OS': 'Chrome OS',
    'Linux': 'Linux',
    'Mac OS': 'macOS',
    'No OS': 'No OS',
    'Windows': 'Windows',
    'macOS': 'macOS'
}

df['col'] = df['col'].map(dict)
Source by app.dataquest.io #
 
PREVIOUS NEXT
Tagged: #pandas #description #dataframe #renaming #column #values
ADD COMMENT
Topic
Name
5+9 =