I am having some troubles with an assigned task. I have tried to figure it out where the error is, but still with no success. I have the following (small, just for example) dataset:
T1 T2 V1 V2
name_1 ['name_3', 'name_4'] [1,2] ['a','b']
name_2 [] [] []
name_3 ['name_1'] [1] ['c']
name_4 ['name_1','name_x','name_13'] [12,2,4] ['c','NA','d']
name_4 ['name_1','name_x','name_13'] [12,2,4] ['c','NA','d']
Since T2, V1 and V2 are shown as lists, I had to use explode() and create two new variables, new_t2 and new_t1, to check what values from those columns are still missing and need to be checked.
df = df.explode('T2')
getting the following error (caused within a function that I am going to discuss later in this post):
TypeError: string indices must be integers
Many thanks for your help.