diff --git a/NEWS.md b/NEWS.md index a414960..268abd8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,12 @@ +# impectPy 2.5.5 + +## Minor Changes +* Fix issue column `playerCountry` in the following functions: + * `getPlayerMatchsums()` + * `getPlayerMatchScores()` + * `getPlayerIterationScores()` + * `getPlayerProfileScores()` + # impectPy 2.5.4 ## Major Changes diff --git a/README.md b/README.md index 1d058ff..1e6c987 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ A package provided by: Impect GmbH -Version: v2.5.4 +Version: v2.5.5 -**Updated: January 2nd 2025** +**Updated: January 6th 2025** --- @@ -35,7 +35,7 @@ pip install impectPy You can also install it from [GitHub](https://github.com/) with: ```cmd -pip install git+https://github.com/ImpectAPI/impectPy.git@v2.5.4 +pip install git+https://github.com/ImpectAPI/impectPy.git@v2.5.5 ``` ## Usage diff --git a/impectPy/__init__.py b/impectPy/__init__.py index b402a31..31066dc 100644 --- a/impectPy/__init__.py +++ b/impectPy/__init__.py @@ -1,5 +1,5 @@ # define version attribute -__version__ = "2.5.4" +__version__ = "2.5.5" # import modules from .access_token import getAccessToken diff --git a/impectPy/player_iteration_scores.py b/impectPy/player_iteration_scores.py index bb8f911..89b0d70 100644 --- a/impectPy/player_iteration_scores.py +++ b/impectPy/player_iteration_scores.py @@ -263,7 +263,6 @@ def fetch_player_iteration_scores(connection, url): # merge with other data averages["squadName"] = averages.squadId.map(squad_map) - averages["playerCountry"] = averages.squadId.map(country_map) averages = averages.merge( iterations[["id", "competitionName", "season"]], left_on="iterationId", @@ -282,6 +281,7 @@ def fetch_player_iteration_scores(connection, url): how="left", suffixes=("", "_right") ) + averages["playerCountry"] = averages.countryId.map(country_map) # remove NA rows averages = averages[averages.iterationId.notnull()] diff --git a/impectPy/player_match_scores.py b/impectPy/player_match_scores.py index b1b05eb..5f88aa7 100644 --- a/impectPy/player_match_scores.py +++ b/impectPy/player_match_scores.py @@ -355,7 +355,6 @@ def fetch_player_match_scores(connection, url): # merge with other data player_scores["squadName"] = player_scores.squadId.map(squad_map) - player_scores["playerCountry"] = player_scores.squadId.map(country_map) player_scores = player_scores.merge( matchplan[["id", "scheduledDate", "matchDayIndex", "matchDayName", "iterationId"]], left_on="matchId", @@ -389,6 +388,7 @@ def fetch_player_match_scores(connection, url): how="left", suffixes=("", "_right") ) + player_scores["playerCountry"] = player_scores.countryId.map(country_map) if not coaches_blacklisted: diff --git a/impectPy/player_matchsums.py b/impectPy/player_matchsums.py index f969b8e..f64192d 100644 --- a/impectPy/player_matchsums.py +++ b/impectPy/player_matchsums.py @@ -249,7 +249,6 @@ def fetch_player_match_sums(connection, url): # merge with other data matchsums["squadName"] = matchsums.squadId.map(squad_map) - matchsums["playerCountry"] = matchsums.squadId.map(country_map) matchsums = matchsums.merge( matchplan[["id", "scheduledDate", "matchDayIndex", "matchDayName", "iterationId"]], left_on="matchId", @@ -283,6 +282,7 @@ def fetch_player_match_sums(connection, url): how="left", suffixes=("", "_right") ) + matchsums["playerCountry"] = matchsums.countryId.map(country_map) if not coaches_blacklisted: diff --git a/impectPy/player_profile_scores.py b/impectPy/player_profile_scores.py index edc39cc..af30b91 100644 --- a/impectPy/player_profile_scores.py +++ b/impectPy/player_profile_scores.py @@ -187,7 +187,6 @@ def fetch_player_profile_scores(connection, url): profile_scores.drop(["-1"], inplace=True, axis=1) # merge with playDuration and matchShare - profile_scores["playerCountry"] = profile_scores.squadId.map(country_map) profile_scores = profile_scores.merge( match_shares, left_on=["iterationId", "squadId", "playerId", "positions"], @@ -222,6 +221,7 @@ def fetch_player_profile_scores(connection, url): how="left", suffixes=("", "_right") ) + profile_scores["playerCountry"] = profile_scores.countryId.map(country_map) # remove NA rows profile_scores = profile_scores[profile_scores.iterationId.notnull()] diff --git a/setup.py b/setup.py index 214a985..3d92996 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ "pandas>=2.2.0", "numpy>=1.24.2"], # *strongly* suggested for sharing - version="2.5.4", + version="2.5.5", # The license can be anything you like license="MIT", description="A Python package to facilitate interaction with the Impect customer API",