5

I have a dataframe like the one below -

enter image description here

How can I combine the rows such that all the neighbourhoods belonging to the same Postcode are displayed in the same row seperated by commas. Something like this -

| Postcode | Borough | Neighbourhood |

| M1B | Scarborough | Rouge, Malvern |

| M5A | Downtown Toronto | Harbourfront, Regent Park |

| M6A | North York | Lawrence Heights, Lawrence Manor |

and the rest of the rows as they are...

harry04
  • 900
  • 2
  • 9
  • 21

0 Answers0