ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()
First of all, to make logical test in Python, you should not use &amp; for a single values equalities (see this) and you should not use question marks around boolean values False and True.

Now, concerning you specific error : When writing product_details['Status'] and product_details['DeletedStatus'] you get each time a Series, which you cannot test for a logical and between them. If you have unique item codes, you can use:

if product_details.iloc[0]['Status'] == 2 and product_details.iloc[0]['DeletedStatus'] == False:
    activ_product.append(itemcode)


It will simply select the first row of product_details and subset the desired column so that the result is a single value and you can compare it.