Reputation: 521
I have a dataframe which contains three rows, and I want to make the amount to 0 for those LeadID? =0 (not a leaddeal). Don't remove them. Can anyone help me with this? Thanks for the help.
LeadID LeadID? Amount
31578 1 $189
17698 1 $187
21891 1 $191
25062 1 $127
25062 0 $127
15133 1 $167
15133 0 $167
14321 1 $122
19148 1 $181
Upvotes: 3
Views: 55
Reputation: 199
for x in LeadID(8):
if x == 1:
x == 0
break
I haven't used Python in a long time but should be something simple like this. I'm also assuming there's only 8 fields. If there's more, add that number, keeping in mind that 0 is the first index.
Upvotes: 0