jeudi 28 février 2019

Change the value of a variable in function of another one (Python)

I'm trying to create a variable by mixing two in function of the values of one of them (both are inside of the table df):

 A = [0, 1, 2, x, 4, 5, x, 7, 8, x, 10]
B=[2,3,4]

for i,j in A,B:
    if i = 'x':
        return i=j
    else i=i

Aucun commentaire:

Enregistrer un commentaire