concat two different list values of different size from two columns in pandas into one list

Viewed 33

I have different list values in pandas such as

         A                   B
  [1,2,3,4,5,6,7,8]       [9,10,11] 
  [2,3,4,5,6,7,8,9]       [12,34,12]

I want to combine two list values into one list and store them in another column like

  A                        B             C    
[1,2,3,4,5,6,7,8]       [9,10,11]       [1,2,3,4,5,6,7,8,9,10,11]
[2,3,4,5,6,7,8,9]       [12,34,12]      [2,3,4,5,6,7,8,9,12,34,12]
1 Answers

simple way to do it is:

df["C"]=df["A"]+df["B"]
Related