Skip to content

Commit

Permalink
fef3eff9a6
Browse files Browse the repository at this point in the history
  • Loading branch information
Liftingthedata committed Jun 28, 2023
1 parent 32fb408 commit e61d47b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scrapers/metacritic/scrape_games_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,9 @@ def calculate_weighted_score(row: pd.Series) -> float:

total_reviews_count = critic_reviews_count + user_rating_count

weighted_score = (critic_weight + user_weight) / total_reviews_count
weighted_score = 0.0 # Default value in case of division by zero
if total_reviews_count != 0:
weighted_score = (critic_weight + user_weight) / total_reviews_count

return weighted_score

Expand Down

0 comments on commit e61d47b

Please sign in to comment.