Skip to content

Commit

Permalink
docs(campaign-finance-blog-post): use nullif
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Feb 3, 2025
1 parent f4a6adf commit 3135512
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/posts/campaign-finance/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 3135512

Please sign in to comment.