reindex plato columns

This commit is contained in:
2024-10-14 12:50:09 +02:00
parent ebef914be6
commit 631ece7abc

View File

@@ -36,7 +36,22 @@ def scrape_plato(get=None):
tmp = re.sub(r"\s+\([^\)]*\)", "", tmp)
return tmp
articles_df = pd.DataFrame(articles_info)
articles_df = pd.DataFrame(articles_info).reindex(
columns=[
[
"artist",
"title",
"url",
"label",
"release_date",
"origin",
"item_number",
"ean",
"delivery_info",
"price",
]
]
)
articles_df["_artist"] = articles_df["artist"].map(clean)
articles_df["_price"] = articles_df["price"].map(lambda x: float(x.split(" ")[-1]))
articles_df["_date"] = datetime.now()