0

So I have two data frames.

df= | crime | precinct | borough |
    | rob   |    1     |         |
    | kill  |    2     |         |
    | kill  |    4     |         |
    | kill  |    3     |         |

borough = | precinct |   borough  |
          |    1     |  Manhattan |
          |    2     |    Bronx   |
          |    3     |  Brooklyn  |
          |    4     |   Queens   |

I now want to add the corresponding boroughs to the borough column in df by matching the precinct from df with the precincts in borough.

I hope its clear :))

Mayank Porwal
  • 27,201
  • 7
  • 25
  • 45
hikabikabu
  • 37
  • 3

0 Answers0