0

I have a data frame(df) as following,

 A | B
--------
a1 |
a2 |*
a3 |

a1,a2,a3 are strings. I need to enter a value to column B, row a2 location(*). How can I do this using labels only?

I tried

df[df['A']=='a2']['B']='new_value'

It did not update the value as expected.

nrnw
  • 441
  • 6
  • 13

0 Answers0