jldbc / pybaseball

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

get_splits() throwing unexpected error #368

Open GiuseppePapalia opened 1 year ago

GiuseppePapalia commented 1 year ago

This happens for quite a few players and it happens over every year

Executing: get_splits("kershcl01", 2015)

Throws:

IndexError: single positional indexer is out-of-bounds
at pybaseball\split_stats.py", line 128, in get_splits
    data = data.rename(columns=data.iloc[0])