reindex plato columns
This commit is contained in:
@@ -36,7 +36,22 @@ def scrape_plato(get=None):
|
|||||||
tmp = re.sub(r"\s+\([^\)]*\)", "", tmp)
|
tmp = re.sub(r"\s+\([^\)]*\)", "", tmp)
|
||||||
return 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["_artist"] = articles_df["artist"].map(clean)
|
||||||
articles_df["_price"] = articles_df["price"].map(lambda x: float(x.split(" ")[-1]))
|
articles_df["_price"] = articles_df["price"].map(lambda x: float(x.split(" ")[-1]))
|
||||||
articles_df["_date"] = datetime.now()
|
articles_df["_date"] = datetime.now()
|
||||||
|
|||||||
Reference in New Issue
Block a user