Skip to content

Commit

Permalink
1ce65d05c5
Browse files Browse the repository at this point in the history
  • Loading branch information
Liftingthedata committed Jun 28, 2023
1 parent 9f74a8c commit f77e999
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scrapers/vgchartz/scrape_game_sales.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ def clean_data(df: pd.DataFrame) -> pd.DataFrame:
{"XS": "Xbox Series X", "XOne": "Xbox One", "X360": "Xbox 360", "XB": "Xbox"}
)

df["Release_Date"] = pd.to_datetime(df["Release_Date"], format="%dth %b %y")
df["Last_Update"] = pd.to_datetime(df["Last_Update"], format="%dth %b %y")
df["Release_Year"] = df["Release_Date"].dt.year
df["Release Date"] = pd.to_datetime(df["ReleaseDate"], format="%dth %b %y")
df["Last Update"] = pd.to_datetime(df["Last Update"], format="%dth %b %y")
df["Release Year"] = df["Release Date"].dt.year

df = df.dropna(subset=["Release_Year"])
df = df.dropna(subset=["Release Year"])

df = df.drop(["Gamex"], axis=1)
return df
Expand Down

0 comments on commit f77e999

Please sign in to comment.