0

enter image description here

I am not sure how to group by my dataframe. I would like to groupby all the neighbourhoods based on each borough. Can anyone help me figure this out?

the column is like this: borough, neighbourhood_1, neighbourhood_2

Quang Hoang
  • 146,074
  • 10
  • 56
  • 74
  • `df.groupby(level=0)`? – ansev Nov 06 '19 at 21:35
  • Please take a look at [How to make good pandas examples](https://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples) and provide sample input and preferred output as text, not as an image, and code for what you've tried so far, to make a [mcve] – G. Anderson Nov 06 '19 at 21:40
  • `df.groupby('borough')` would work on higher pandas as well. – Quang Hoang Nov 06 '19 at 21:41

0 Answers0