text_plain_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

recipes = pd.read_csv('/kaggle/input/foodcom-recipes-and-reviews/recipes.csv')
reviews = pd.read_csv('/kaggle/input/foodcom-recipes-and-reviews/reviews.csv')

user_counts = reviews.groupby('AuthorId')['RecipeId'].nunique()

single_recipe_users = user_counts[user_counts == 1].index.tolist()

recipesidss = reviews.loc[reviews['AuthorId'].isin(single_recipe_users), 'RecipeId']

recipe_counts = reviews.loc[reviews['RecipeId'].isin(recipesidss), 'RecipeId'].value_counts()

useless_recipes = recipe_counts[recipe_counts == 1].index.tolist()

reviews = reviews[~reviews['RecipeId'].isin(useless_recipes)]

len(reviews)