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 roster.py to Include Wage Attribute #790

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion sportsipy/fb/roster.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ def __init__(self, player_data, player_id):
self._dribblers_contested = None
self._tackle_percentage = None
self._times_dribbled_past = None
self._wage = None

self._parse_player_stats(player_data)

Expand Down Expand Up @@ -402,7 +403,8 @@ def dataframe(self):
'dribblers_tackled': self.dribblers_tackled,
'dribblers_contested': self.dribblers_contested,
'tackle_percentage': self.tackle_percentage,
'times_dribbled_past': self.times_dribbled_past
'times_dribbled_past': self.times_dribbled_past,
'wage': self._wage
}
return pd.DataFrame([fields_to_include], index=[self.player_id])

Expand Down Expand Up @@ -1467,6 +1469,13 @@ def times_dribbled_past(self):
past.
"""
return self._times_dribbled_past

@int_property_decorator
def wage(self):
"""
Returns an ``int`` of the player's wage in euros per week.
"""
return self._wage


class Roster:
Expand Down