parse date column

This commit is contained in:
2025-07-26 17:52:28 +02:00
parent 8fe8d16ad9
commit ac8759258d

View File

@@ -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(),