Skip to content

Commit

Permalink
[BA Torment] 241109 batch fix (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
HU-Lee authored Nov 9, 2024
1 parent c12b6da commit fe21746
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ba-torment-batch/parse/rank.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ def get_rank_season_normal(season: str) -> Tuple[int, pl.DataFrame]:
"""
Get "Total Assault (총력전)" rank data
"""
url = f"{constants.DATA_BASE_URL}/RaidRankData/{season}/FullData_Original.csv"
url = f"{constants.DATA_BASE_URL}/RaidRankData/{season}/TeamDataDetail_Original.csv"

try:
df = pl.read_csv(url)
df = pl.read_csv(url, schema=pl.Schema({"Rank": pl.Int64, "BestRankingPoint": pl.Int64, "AccountId": pl.Int64}), truncate_ragged_lines=True)
target_boss = 0
return target_boss, \
df.select(pl.col("AccountId", "Rank", "BestRankingPoint")) \
.rename({"AccountId": "USER_ID", "Rank": "FINAL_RANK", "BestRankingPoint": "SCORE"}) \
df.rename({"AccountId": "USER_ID", "Rank": "FINAL_RANK", "BestRankingPoint": "SCORE"}) \
.unique(keep="first") \
.filter(pl.col("SCORE") > constants.TORMENT_MIN_SCORE) \
.filter(pl.col("FINAL_RANK") <= constants.PLATINUM_CUT) \
Expand Down

0 comments on commit fe21746

Please sign in to comment.