I've got a dataset that looks like this:
geo mark value
texas nissan 2
texas nissan 78
ny NA 65
ny NA 15
ca audi 22
I want to manually replace the NA
in the column mark
based on the geo
column. So, in the example above, for every row of geo
called 'ny' I want to insert 'toyota', like this:
geo mark value
texas nissan 2
texas nissan 78
ny toyota 65
ny toyota 15
ca audi 22
How to do this?