Skip to content

Commit

Permalink
Merge pull request #11 from ddxv/fix-histogram-ios
Browse files Browse the repository at this point in the history
Histogram failing due to bad application to dataframe
  • Loading branch information
ddxv authored Oct 5, 2023
2 parents 76d0ab3 + 50a59c3 commit 8ef77d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions adscrawler/app_stores/apple.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ def clean_ios_app_df(df: pd.DataFrame) -> pd.DataFrame:
),
)
try:
df["histogram"] = [
int(num) for num in re.findall(r"\d+", df["user_ratings"])[1::2]
]
df["histogram"] = df["user_ratings"].apply(
lambda x: [int(num) for num in re.findall(r"\d+", x)[1::2]]
)
except Exception:
logger.exception("Unable to parse histogram")
df["histogram"] = None
Expand Down

0 comments on commit 8ef77d0

Please sign in to comment.