Created
November 27, 2021 22:08
-
-
Save SouravJohar/9093e628099c522a39d419dcc78779e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
users = {} | |
for i in range(len(df)): | |
user_id = df.iloc[i].user_id | |
if user_id not in users: | |
users[user_id] = 1 | |
else: | |
users[user_id] += 1 | |
num_recipes_range = (100,500) | |
users_of_interest = [] | |
for user, num_recipes in users.items(): | |
if num_recipes >= 100 and num_recipes <= 500: | |
users_of_interest.append(user) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment