Players¶
- class Player(player_id)[source]¶
A player, loaded from the ESPN core API athlete record.
Example values are for
Player(277916), Ajinkya Rahane.- Parameters:
player_id (int)
- property major_teams: list[str]¶
Names of the player’s major teams (one request per team, on first access).
- get_career_averages(file_name=None, match_format=11, data_type='allround')[source]¶
Write career averages (overall and by span) to a CSV file.
- get_career_summary(file_name=None, match_format=11, data_type='allround')[source]¶
Write the career summary (one row per format, venue, opponent…) to CSV.
- get_data(file_name=None, match_format=11, data_type='allround', view='match')[source]¶
Write the player’s record match by match (or another view) to CSV.
- Parameters:
file_name (str | None) – Output path. Defaults to
{player_id}_{match_format}_{data_type}_{view}.csv.match_format (int) – 1 Test, 2 ODI, 3 T20I, 11 all international, 20 youth Test, 21 youth ODI.
data_type (str) –
allround,batting,bowlingorfielding.view (str) –
match,innings,cumulative,reverse_cumulative,series,tourorground.
- Return type:
None