Skip to content

fix index issue with NBA home_points on OT games #662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DoubleBarrelBirds
Copy link

the home_points index of -1 seems to work, but not for overtime games.

This is the test data I used to validate

data = {'away_points' : [115, 108, 109, 126],
        'home_points' : [116, 121, 117, 133]}

expected_values_df = pd.DataFrame(data, columns = ['away_points', 'home_points'], index=['201810200PHI', '201810200POR', '201904070TOR', '201904050PHO'])

x1 = Boxscore("201810200PHI").dataframe[['away_points', 'home_points']]
x2 = Boxscore("201810200POR").dataframe[['away_points', 'home_points']]
x3 = Boxscore("201904070TOR").dataframe[['away_points', 'home_points']]
x4 = Boxscore("201904050PHO").dataframe[['away_points', 'home_points']]

result_df = x1.append(x2).append(x3).append(x4)
result = result_df.equals(expected_values_df)
result

the home_points index of -1 seems to work, but not for overtime games.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant