I have the following column of a data frame:
I get it by doing
and I would like to consider only the first 20 and the last 20 elements of each list. Is there a way to do this?
I have tried to do the following:
dataFrame['opcodes_modified'] = dataFrame['opcodes'].apply(lambda x: x[:20].append(x[-20:])
but i get the following error message:
SyntaxError: unexpected EOF while parsing
can somebody help me? Thank's in advance.