jldbc / pybaseball

Pull current and historical baseball statistics using Python (Statcast, Baseball Reference, FanGraphs)
MIT License
1.18k stars 322 forks source link

Splits #374

Open Milkman9691 opened 10 months ago

Milkman9691 commented 10 months ago

Can we sub in start_dt & end_dt for year here?

get_splits(playerid, year=None, player_info=False, pitching_splits=False)

ss77995ss commented 10 months ago

I don't think BR gives us the options to select certain range of years data. It can only get data for one specific year or player's career splits data by set year=None (which will set argument year=Career by default).

Here is an example page for this method: link You can click the splits navigation button and see that BR only provide each Year plus Career option.

Currently, we can only get year's data separately and try to combine them by ourselves unless we find other argument we can use.

Hope this help you answer your question.

ref: https://github.com/jldbc/pybaseball/blob/master/docs/split_stats.md