parse date column
This commit is contained in:
@@ -5,6 +5,7 @@ from utils import parse_date
|
||||
def parse(df: pl.LazyFrame) -> pl.LazyFrame:
|
||||
"""Parse the Plato DataFrame."""
|
||||
return df.with_columns(
|
||||
date=pl.col("date").cast(pl.Date),
|
||||
artist=pl.coalesce(pl.col("artist"), pl.col("name").str.split("-").list.get(1))
|
||||
.str.strip_chars()
|
||||
.str.to_lowercase(),
|
||||
|
||||
Reference in New Issue
Block a user