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 4, 2025
1 parent a888a53 commit ae33e9d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.

Large diffs are not rendered by default.

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 ae33e9d

Please sign in to comment.