During a pandas DF loop, i'm trying to split the result of variable in two, but i got an error:
My code:
...
for e in zip(list(df[each_column]), list(df['epoch'])):
print(metric,'=',e)
epoch_time = e.split(',')[1]
value = e.split(',')[0]
...
The print of variable e:
on 0: metric = ('1121', 1656428160)
on 0: metric = ('1101', 1656428220)
on 0: metric = ('1015', 1656428280)
I would like to get
on 0: metric = 1121 1656428160
on 0: metric = 1101 1656428220
on 0: metric = 1015 1656428280
--> error when i tried to split e:
AttributeError: 'tuple' object has no attribute 'split'
How can i get each value separately?
Many thanks for help