Skip to content
RED SAG Skills
medium10 pts · first answer countspythonpandas

Setting a flag through chained indexing

After this line, the flag column in df is unchanged. What is the correct way to set it?

df[df["qty"] > 0]["flag"] = 1
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions