Skip to content

Commit

Permalink
Use columns keyword rather than no-keyword axis for drop in team_resu…
Browse files Browse the repository at this point in the history
…lts (#282)

* Use columns keyword rather than no-keyword axis for drop

* run CI

* Update draft test

Co-authored-by: Tyler Burch <tburch@redsox.com>
  • Loading branch information
tjburch and Tyler Burch authored Aug 6, 2022
1 parent 0736649 commit e57e6e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pybaseball/team_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def process_win_streak(data: pd.DataFrame) -> pd.DataFrame:
data['Streak2'] = data['Streak'].str.len()
data.loc[data['Streak'].str[0]=='-','Streak2'] = -data['Streak2']
data['Streak'] = data['Streak2']
data = data.drop('Streak2',1)
data = data.drop(columns="Streak2")
return data

def make_numeric(data: pd.DataFrame) -> pd.DataFrame:
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/pybaseball/test_amateur_draft.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ def test_amateur_draft_future() -> None:
print(result)

assert len(result.columns) == 8
assert len(result) in (36, 37) # the Astros getting docked a pick throws this off for 2021
assert (len(result) > 30) and (len(result) < 60)

0 comments on commit e57e6e7

Please sign in to comment.