0

My input dataframe;

A      B      Active
2      3      1
3      4      0
4      5      1
5      3      0
2      3      1

I want to assign a variable/ parameter from outside. If the outside variable is 55, "A" columns values will be "0 (zero)" according to "Active" column.

Variable = 55

A      B      Active
2      3      1
0      4      0
4      5      1
0      3      0
2      3      1

If the variable is 555, A columns values will be remain same. So, the "Active" column will be ignored and not activated.

Variable = 555

A      B      Active
2      3      1
3      4      0
4      5      1
5      3      0
2      3      1

Could you please help me about this?

Salih
  • 719
  • 1
  • 6
  • 12

0 Answers0