def continent_af():
africa = df[df['cont'] == 'AF' or df['cont'] == 'af']
return africa
print(continent_af())
So the first half of the second line returned what I wanted, but when I put the or function in, i am getting an error, which reads
the truth value of a series is ambiguous. use a.empty(), a.bool(), a.any(), or a.all()
any help would be much appreciated