jldbc / pybaseball

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

team_results.py `FutureWarning` #242

Closed notBillJames closed 2 years ago

notBillJames commented 2 years ago

On lines 72, and 85 no keywords are passed for arguments into the DataFrame.drop() function. The following FutureWarning is returned:

pybaseball/pybaseball/team_results.py:72: FutureWarning: In a future version of pandas all arguments of DataFrame.drop except for the argument 'labels' will be keyword-only
  df = df.drop('',1) #not a useful column

It would be good to change this to avoid deprecation.

tjburch commented 2 years ago

Thanks for noting this, just made a quick PR to resolve.

schorrm commented 2 years ago

Closed by #243