I would like to replace entire columns of a pandas dataframe with other columns, for example:
and I would like to replace the columns A and B. What I did is the following:
but it does not work. In particular I get the following error:
in both cases. Can anyone help me? Thank's in advance.
[EDIT] The original dataframe is the following:
on which I did the following modification:
dataFrame['opcodes'] = dataFrame['instructions'].apply(lambda x:[i.split()  for i in x])
now I would like to define an other dataframe on which only the 'opt' column and a column with the values 'opcodes' appear.