joelgrus / data-science-from-scratch

code for Data Science From Scratch book
MIT License
8.63k stars 4.5k forks source link

Bug in `most_common_interests_with(user)` method definition corrected #37

Open mdusan opened 7 years ago

mdusan commented 7 years ago

Corrected most_common_interests_with(user) method definition is exactly the same as in the book (page8). The same result as the proposed correction would give a method which takes user_id = user["id"]argument instead of a dict type user argument. However, in that case the code that would be iterating through all the users to display the results would be less clean: