I'm new to Python so I'm sorry if terminology is not correct; I've searched for similar posts but didn't find anything helpful for my case. I have a dataframe like this:
Column1 Column2
0 0001 [('A','B'),('C','D'),('E','F')]
1 0001 [('A','B'),('C','D'),('E','F')]
2 0001 [('A','B'),('C','D'),('E','F')]
3 0002 [('G','H'),('I','J')]
4 0002 [('G','H'),('I','J')]
Each row is replicated n times based on the number of tuples contained in the list of Column2. What I'd like to do is to add a new column containing only one tuple per row:
Column1 Column2 Column2_new
0 0001 [('A','B'),('C','D'),('E','F')] 'A' 'B'
1 0001 [('A','B'),('C','D'),('E','F')] 'C' 'D'
2 0001 [('A','B'),('C','D'),('E','F')] 'E' 'F'
3 0002 [('G','H'),('I','J')] 'G' 'H'
4 0002 [('G','H'),('I','J')] 'I' 'J'
Can you please help me with this?
Thanks in advance for any suggestion