# Create the dictionary containing the data of the new column col_dict = {'Samsung': 'Lee kun-hee', 'Huawei': 'Xu Zhijun', 'Apple': 'Tim Cook', 'Oppo': 'Tony Chen', 'Vivo': 'Shen Wei'} # Assign the values of the dictionary as the values of the new column df['Current chairperson'] = col_dict.values() df ''' Please remember that the number of values in the list should equal the numbers of rows in the pandas dataframe '''
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter