Skip to content

Commit

Permalink
drop column name
Browse files Browse the repository at this point in the history
  • Loading branch information
extreme4all committed Feb 3, 2024
1 parent f903f5f commit db16e8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion api/MachineLearning/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion api/cogs/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit db16e8f

Please sign in to comment.