diff --git a/api/MachineLearning/data.py b/api/MachineLearning/data.py index 1d2b23e..a8b34f6 100644 --- a/api/MachineLearning/data.py +++ b/api/MachineLearning/data.py @@ -78,7 +78,11 @@ def __clean(self) -> None: - fill na with 0 - create a dataframe with only low level players (total level < 1_000_000) """ - self.df_clean.drop(columns=["id", "timestamp", "ts_date"], inplace=True) + col_to_drop = ["id", "timestamp", "ts_date", "name"] + col_to_drop = [c for c in self.df_clean.columns if c in col_to_drop] + logger.info(f"dropping: {col_to_drop}") + self.df_clean.drop(columns=col_to_drop, inplace=True) + # set index to player id self.df_clean.set_index(["Player_id"], inplace=True) diff --git a/api/cogs/requests.py b/api/cogs/requests.py index 03c45a6..44f8869 100644 --- a/api/cogs/requests.py +++ b/api/cogs/requests.py @@ -13,7 +13,7 @@ async def make_request(url: str, params: dict, headers: dict = {}) -> list[dict] _secure_params["token"] = "***" # Log the URL and secure parameters for debugging - logger.info({"url": url, "params": _secure_params}) + logger.info({"url": url.split("/v")[-1], "params": _secure_params}) # Use aiohttp to make an asynchronous GET request async with aiohttp.ClientSession() as session: