Each operation returns a frame describing the next calculation. Keep intermediate frames in variables to build more than one query from the same input.

from chalk import _
from chalkdf import DataFrame

tx = DataFrame({"user": ["a", "a", "b"], "amount": [12, 8, 30]})

large = tx.filter(_.amount >= 10)
users = large.select("user")
users.run()
#
userstring
1a
2b

You can still use large to sum the amounts, or use tx to include all three transactions. The call to users.run() requests the rows for that branch. See Query execution for inspecting the plan before requesting results.

See DataFrame.run, DataFrame.explain_logical.