Premium problem86. Distinct Neighbourhoods

Easy Locked

listings has columns listing_id, city, neighbourhood and price. Some rows have no neighbourhood recorded.

Return the distinct neighbourhood names as a Series, sorted alphabetically, with the missing ones excluded and the index renumbered from 0.

Input

   listing_id    city neighbourhood  price
0           1   Paris        Marais  180.0
1           2   Paris    Belleville   95.0
2           3  Lisbon          None  120.0
3           4  Lisbon        Alfama   70.0
4           5    Oslo   Grunerlokka  210.0
5           6    Oslo        Marais  150.0

Output

0         Alfama
1     Belleville
2    Grunerlokka
3         Marais
Name: neighbourhood, dtype: object

Premium problem

This one's part of Premium. Unlock the full Pandas track plus every other premium problem on the site.

Implement solve(...)