Attached is my data frame and I want to compare column SOI priority and column %stake and form comment accordingly. I tried the below code.
treasury_shares['Priority comment']=""
temp=round(treasury_shares['%Stake'] * 100, 0)
treasury_shares['%Stake'] = round(treasury_shares['%Stake'] * 100, 0).astype(str) + "%"
# treasury_shares["%Stake"] = treasury_shares["%Stake"].str.replace(".0", "")
treasury_shares = treasury_shares.reindex(
columns=["performance_id", "SOI priority", "Date", "issued_shares_as_reported",
"share_level",
"share_be", "%Stake","Priority comment"])
if((temp>10)&(treasury_shares['SOI priority']==1)):
treasury_shares['Priority comment'] = 'SOI'+treasury_shares['SOI priority']+'&Stake>10'
I am getting the following error. line 1329, in nonzero raise ValueError( ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
Attached is the data frame image 
+-------------+-------------+------------------+
| SOI_prority | %Stake | Priority_comment |
+-------------+-------------+------------------+
| 1 | 44% | SOI1&Stake>10% |
+-------------+-------------+------------------+
