Wrestling - uwaggs/usportspy GitHub Wiki
Wrestling Functions
The usportspy
package offers functions to retrieve wrestling-related data, such as athlete rankings by weight category and team rankings.
Functions
wrestling_athlete_rankings
Fetches wrestling athlete rankings for a specified gender and weight category.
Parameters:
gender
(str): Specifies the gender of the athletes. Must be either"m"
or"w"
.weight
(int): The weight category in kilograms.
Returns:
pd.DataFrame
: A DataFrame containing the rankings of athletes in the specified weight category. The columns of the returned DataFrame are: Weight Category, Rank, Name, School, and Last Updated.
Example:
from usportspy import wrestling_athlete_rankings
# Get male athlete rankings in the 57kg weight category
male_athlete_rankings = wrestling_athlete_rankings("m", 57)
print(male_athlete_rankings.head())
# Get female athlete rankings in the 56kg weight category
female_athlete_rankings = wrestling_athlete_rankings("w", 56)
print(female_athlete_rankings.head())
Expected output:
Weight Category Rank Name School Last Updated
0 57kg 1 Kyle Robinson Guelph 02/01/2020
1 57kg 2 Garette Saunders Brock 02/01/2020
2 57kg 3 Harris Valdes Alberta 02/01/2020
3 57kg 4 Drake Buechler Saskatchewan 02/01/2020
4 57kg 5 Francesco Fortino McMaster 02/01/2020
Weight Category Rank Name School Last Updated
0 56kg 1 Alexandria Town York 11/16/2021
1 56kg 2 SueAnne Harms Saskatchewan 11/16/2021
2 56kg 3 Vivica Addo Alberta 11/16/2021
3 56kg 4 Grace Chambers Calgary 11/16/2021
4 56kg 5 Macy Malysiak McMaster 11/16/2021
wrestling_team_rankings
Fetches wrestling team rankings for a specified gender.
Parameters:
gender
(str): Specifies the gender of the teams. Must be either"m"
or"w"
.
Returns:
pd.DataFrame
: A DataFrame containing the team rankings. The columns of the returned DataFrame are: Rank, School, Points, Previous Rank, and Last Updated.
Example:
from usportspy import wrestling_team_rankings
# Get male team rankings
male_team_rankings = wrestling_team_rankings("m")
print(male_team_rankings.head())
# Get female team rankings
female_team_rankings = wrestling_team_rankings("w")
print(female_team_rankings.head())
Expected output:
Rank School Points Previous Rank Last Updated
0 1 Brock 81 1 02/01/2020
1 2 Saskatchewan 50 3 02/01/2020
2 3 Alberta 49 2 02/01/2020
3 4 Concordia 47 7 02/01/2020
4 5 Guelph 42 6 02/01/2020
Rank School Points Previous Rank Last Updated
0 1 Brock 50 1 02/01/2020
1 2 Calgary 45 3 02/01/2020
2 3 Saskatchewan 41 2 02/01/2020
3 4 Concordia 32 5 02/01/2020
4 5 Alberta 31 4 02/01/2020