Skip to content

Commit c1cd077

Browse files
author
Kevin Krauss
committed
[] removed unnecessary column changes
1 parent 1e16414 commit c1cd077

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

pybaseball/boxes.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,5 @@ def boxes(team: str, date: str) -> pd.DataFrame:
6868
soup = get_soup(team, game_date)
6969
table = get_table(soup)
7070
table = table.dropna(how='all') # drop if all columns are NA
71-
# scraped data is initially in string format.
72-
# convert the necessary columns to numeric.
73-
for column in ['Age', '#days', 'G', 'PA', 'AB', 'R', 'H', '2B', '3B',
74-
'HR', 'RBI', 'BB', 'IBB', 'SO', 'HBP', 'SH', 'SF', 'GDP',
75-
'SB', 'CS', 'BA', 'OBP', 'SLG', 'OPS', 'mlbID']:
76-
#table[column] = table[column].astype('float')
77-
table[column] = pd.to_numeric(table[column])
78-
#table['column'] = table['column'].convert_objects(convert_numeric=True)
7971
table = table.drop('', axis=1)
8072
return table

0 commit comments

Comments
 (0)