I'm trying to work these comand lines:
for lm_inf in df.columns:
if df['a1'].astype('int64') > 0 & df['b1'].astype('int64') < 0:
df['lm_inf'] == 0
elif df['a1'].astype('int64') > 0 & df['b1'].astype('int64') > 0:
df['lm_inf'] == df['a1']
elif df['a1'].astype('int64') < 0 & df['b1'].astype('int64') < 0:
df['lm_inf'] == 0
elif df['a1'].astype('int64') < 0 & df['b1'].astype('int64') > 0:
df['lm_inf'] == 0
else:
df['lm_inf'] == 0
But, they are not working. How can I rewrite the comand lines to solve this problem?
Aucun commentaire:
Enregistrer un commentaire