use .apply() function to change values to a column of the dataframe I have a dataframe which is the following:



and I would like to consider only the column of instructions and keep just the values push, test, mov, test ,....., so just the first word of each string inside each list. What I am doing is the following:

dataFrame['opcodes'] = dataFrame['instructions'].apply(instruction.split()[0] for instruction in dataFrame['instructions'])


but I get the following message:

TypeError: 'generator' object is not callable


so, my objective is to change the values only of the column instructions. 

Can somebody please help me? Thank's in advance.
use lambda function like as follows

dataFrame['opcodes'] = dataFrame['instructions'].apply(lambda x:[i.split()[0] for i in x])