lundi 14 juin 2021

ELSEIF statement with boolean output [duplicate]

Below is what I tried:

if (p_testing < 0.05):
    sig == True,
elif (p_testing > 0.05):
    sig == False

The output I am trying to have is either False or True. The error I am receiving is the following:

ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

Thank you in advance for the help!

Aucun commentaire:

Enregistrer un commentaire