Answers for "pandas changing multiple values in a column"

0

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)
Posted by: Guest on July-25-2021

Code answers related to "pandas changing multiple values in a column"

Python Answers by Framework

Browse Popular Code Answers by Language