From 31355128248f6d915fb52ed10e83899a592de263 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Mon, 3 Feb 2025 06:59:38 -0500 Subject: [PATCH] docs(campaign-finance-blog-post): use nullif --- docs/posts/campaign-finance/index.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/posts/campaign-finance/index.qmd b/docs/posts/campaign-finance/index.qmd index 7a623f93cc5e..32251103bfcd 100644 --- a/docs/posts/campaign-finance/index.qmd +++ b/docs/posts/campaign-finance/index.qmd @@ -214,7 +214,7 @@ from ibis.expr.types import StringValue, DateValue def mmddyyyy_to_date(val: StringValue) -> DateValue: - return val.cast(str).lpad(8, "0").to_timestamp("%m%d%Y").date() + return val.cast(str).lpad(8, "0").nullif("").to_timestamp("%m%d%Y").date() cleaned = cleaned.mutate(date=mmddyyyy_to_date(_.TRANSACTION_DT)).drop("TRANSACTION_DT")