Note
Click here to download the full example code
Marcel Projections - BattingΒΆ
Out:
1B 2B ... SH SF
playerID yearID ...
alonspe01 2020 61.835746 24.424880 ... 0.268709 2.740424
martijd02 2020 88.221199 30.439315 ... 0.176546 5.085481
troutmi01 2020 68.296501 24.724267 ... 0.177973 3.910907
bellico01 2020 78.348910 28.931966 ... 0.180862 3.481480
suareeu01 2020 80.978952 21.878351 ... 0.173745 5.240382
[5 rows x 11 columns]
from pybbda.analysis.projections import MarcelProjectionsBatting
batting_marcels = MarcelProjectionsBatting()
print(
batting_marcels.projections(projected_season=2020)
.sort_values("HR", ascending=False)
.head(5)
)
Total running time of the script: ( 0 minutes 2.605 seconds)