Skip to content

Commit

Permalink
Fix columns to not update
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelGFagan committed Oct 22, 2024
1 parent 5901bb2 commit 3cab711
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pybaseball/amateur_draft.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def get_draft_results(year: int, draft_round: int, include_id: bool) -> pd.DataF
return draft_results

def clean_draft_results_with_links(draft_results: pd.DataFrame) -> pd.DataFrame:
draft_results['Link'] = draft_results['Name'].apply(
draft_results['link'] = draft_results['Name'].apply(
lambda value: value[1] if value[1] != None else 'NA'
)
draft_results['id_type'] = draft_results['Link'].apply(
Expand All @@ -40,7 +40,7 @@ def clean_draft_results_with_links(draft_results: pd.DataFrame) -> pd.DataFrame:
)
draft_results = draft_results.apply(
lambda column: [
value[0] if column.name not in ['Link', 'is_minors_id', 'player_id']
value[0] if column.name not in ['link', 'id_type', 'player_id', 'notes']
else value for value in column
]
)
Expand Down

0 comments on commit 3cab711

Please sign in to comment.