d
realData = d[d.Borough != 'Unspecified']
realData = pandas.Series(data=realData.Borough.values, index=realData.City)
d['Borough'] = d.City.map(realData)
Conditionally replacing values based on values in another column