jawilliams3000 / DAT_SF_12

0 stars 0 forks source link

HW 1 review by OttoS #1

Open ostegm opened 9 years ago

ostegm commented 9 years ago

@jawilliams3000

Nice work overall

"Comments refer to Question numbers:

2. We were asking you do do len(data) and print(data[500]) - so good job. Sorry that was unclear. Just trying to get you guys to learn how to explore the JSON file.

3. Another option is df.head(20) but both are correct

9. Well done - you have a clear handle on SQL :-) - but here's another way, potentially shorter:

pd.read_sql(""""""SELECT neighborhood, category FROM (SELECT neighborhood, category, MAX(cat_count) FROM (SELECT neighborhood, category, COUNT(category) AS cat_count FROM event GROUP BY neighborhood, category) GROUP BY neighborhood) WHERE category != 'Street and Sidewalk Cleaning'"""""", con)"