All our Data Science projects include bite-sized activities to test your knowledge and practice in an environment with constant feedback.
All our activities include solutions with explanations on how they work and why we chose them.
Calculate the "Field Goal accuracy" of a player by dividing their field goals by their total attempts. Store the result in the variable field_goal_perc
.
Remember, MJ's name in this dataset is "Michael Jordan*" because he was (obviously) inducted in the HoF. Enter your result with up to three decimal points. That is, if the value is 0.618324
, enter 0.618
(including the 0
and the dot .
).
Calculate "Field Goals per Game" using the series field_goals
and games_played
. Store your results in the variable field_goals_per_game
All stars here...
In the NBA lingo, field goals account for all the "goals" scored by a player, EXCEPT free throws. So, if we want to calculate the total number of points scored by a player, we must add field goals and free throws. Field goals are a combination of 2-point and 3-point goals. For this exercise, you can safely assume that all "field goals" have a value of 2.
Calculate Total Points scored by a player, by adding the series containing field goals and free throws. Store your results in the variable total_points
.
Who's the player that, according to our dataset, has scored the most points in the NBA history?
Using the series that you previously calculated, total_points
, calculate "Total points per minute". Store your results in the variable points_per_minute
.
Important. This activity relies on
total_points
. Make sure you have completed that one correctly.
Store your results in ft_perc
.
A battle of titans. Who had a better FT% record?
Create a boolean series that contains True
values for those players that are in the top 25% by free throw efficiency (using the preivously calculated) ft_perc
series. Store your results in the variable ft_top_25
.
Your result should look something like:
>>> ft_top_25.head(10)
Player
A.C. Green False
A.J. Bramlett False
A.J. English False
A.J. Guyton True
A.J. Hammons False
A.J. Price False
A.J. Wynder False
Aaron Brooks True
Aaron Gordon False
Aaron Gray False
dtype: bool
Answer using the previously calcualted series ft_top_25
.
Create a boolean series that contains True
values for those players that have scored 0 total points. Store your results in the variable players_0_points
.
Using your previous series, answer: how many players registered 0 points?