Skip to content
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

Update boxscore.py #661

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

Conversation

DoubleBarrelBirds
Copy link

@DoubleBarrelBirds DoubleBarrelBirds commented Sep 19, 2021

fix NBA home_wins, home_losses, away_wins, away_losses if NBA team is the 76ers. The re findall \d will match the 76 in 76ers and result in in accurate results.

This can be tested by the following

data = {'away_losses': [4.0, None],
        'away_wins'  : [4.0, None],
        'home_losses': [None, 1.0],
        'home_wins'  : [None, 2.0]}
expected_values_df = pd.DataFrame(data, columns = ['away_losses','away_wins', 'home_losses', 'home_wins'], index=['201810300TOR','201810200PHI'])

x1 = Boxscore("201810300TOR").dataframe[['away_losses', 'away_wins']]
x2 = Boxscore("201810200PHI").dataframe[['home_losses', 'home_wins']]

x1.append(x2).equals(expected_values_df)

I'm not a Python programmer, so there may be better ways to resolve. Hoping this will help get the item resolved.

fix home_wins, home_losses, away_wins, away_losses if NBA team is 76ers. the re findall \d will match the 76 in 76ers and result in in accurate results.
@DoubleBarrelBirds DoubleBarrelBirds marked this pull request as ready for review September 19, 2021 18:12
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.

None yet

1 participant