Python Challenge: Calculate Average Score
Calculate the average score for each project, but only include projects where more than one team member has provided a score. Your output should include the project ID and the calculated average score for each qualifying project.
Python Challenge: Calculate Average Score
Calculate the average score for each project, but only include projects where more than one team member has provided a score. Your output should include the project ID and the calculated average score for each qualifying project.
Let’s dive into a medium-level Python interview question used by Deloitte. It will test your skills in data manipulation, filtering, and aggregation, using tools like Pandas to generate precise and insightful output.
Approach Hints:?
To help you think through this problem on your own, here are the technical concepts and steps used in this solution:
领英推荐
??? We Value Your Feedback!
We’re always looking to enhance your experience, and we’d love your feedback! Are there any features you’d like to see on the platform? How can we make your learning journey even smoother?
Take a few minutes to share your thoughts in our quick survey.
??? More Education Resources
For those looking to deepen their knowledge, here are two valuable reads to enhance your skills and stay competitive:
Discover practical ways to make a greater impact in your data science role by focusing on high-impact projects and aligning with business goals.
In a data science career, you'll eventually face the question, "What do you want to specialize in?" This article explores why specialization matters, helps you identify the right path, and provides practical steps to get started in your chosen area.
Africa Airtel || SQL || Python || Databricks ||Pyspark || Azure || AWS || Computer Science Engineer ||
3 个月import pandas as pd grouped=project_data.groupby('project_id').agg({'score':'mean', 'team_member_id':'nunique'}) print(grouped) filtered_grouped = grouped[grouped['team_member_id'] > 1] filtered_grouped = filtered_grouped.rename(columns={'score': 'average_score'}) print(filtered_grouped) this is may solution