some formatting and add cli compilation

This commit is contained in:
Thomas (Tom) C. Gorordo 2026-05-20 12:04:17 -07:00
parent 8836c49091
commit 4a624a4847
Signed by: tgorordo
GPG key ID: 0CBED22BB0D94490
9 changed files with 115 additions and 61 deletions

View file

@ -23,18 +23,23 @@ def _():
@app.cell
def _(mo, pl):
df = pl.read_csv(mo.notebook_dir() / "test_ballot.csv")
df = df.with_columns([ pl.col(c) # make safe, clean up
.cast(pl.Utf8)
.str.strip_chars()
.cast(pl.Int64, strict=False).fill_null(df.width + 1)
for c in df.columns ])
df = df.with_columns(
[
pl.col(c) # make safe, clean up
.cast(pl.Utf8)
.str.strip_chars()
.cast(pl.Int64, strict=False)
.fill_null(df.width + 1)
for c in df.columns
]
)
df
return (df,)
@app.cell
def _(df, smith_set):
smith_set(df) # find the smith set (should be "Alice" and "Bob" as a pair)
smith_set(df) # find the smith set (should be "Alice" and "Bob" as a pair)
return