Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas changing multiple values in a column

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

laptops['os'] = laptops['os'].map(mapping_dict)
print(my_series)
Source by app.dataquest.io #
 
PREVIOUS NEXT
Tagged: #pandas #changing #multiple #values #column
ADD COMMENT
Topic
Name
5+3 =