
Retrieve selected items from a Python Pandas series by broadcasting a condition, then using it as a boolean (“mask”) index:
s = pd.Series([10, 20, 30], index=list('abc'))
s >= 20 # [False, True, True]
s.loc[ s >= 20 ] # returns [20, 30]

Retrieve selected items from a Python Pandas series by broadcasting a condition, then using it as a boolean (“mask”) index:
s = pd.Series([10, 20, 30], index=list('abc'))
s >= 20 # [False, True, True]
s.loc[ s >= 20 ] # returns [20, 30]