I have a dataframe like
found_record
Unnamed: 0 AID AnotherID otherID PositionType CreatedVer LatestVer DeleteFlag
194 162 00000000000000010601233000119682 129030_503520 00000000000020010601233000119678 2 000190010111 000190010111 0
and I do
found_record['PositionType']
194 2
Name: PositionType, dtype: object
This is a Series
I want to compare the position type of this record to a number (for example 2)
but when I do
if found_record['PositionType']==2:
(Pdb) n
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
How can I compare it?
p.s. I tried
condition(found_record['PositionType']==2)
*** Non-numeric breakpoint number (found_record['PositionType']==2)