Skip to content

Commit 786efe2

Browse files
Update SKILL.md
1 parent 32b1bbf commit 786efe2

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎.ai/skills/make-pythonic/SKILL.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ def some_function(column: Expr | str) -> Expr:
338338

339339
**IMPORTANT:** In `functions.py`, string arguments almost never mean column names. Functions operate on expressions, and column references should use `col()`. Category C applies mainly to DataFrame methods and context APIs, not to scalar/aggregate/window functions. Do NOT convert string arguments to column expressions in `functions.py` unless there is a very clear reason to do so.
340340

341+
The documented exception is the column inputs of aggregate functions (`sum`, `avg`, `count`, `corr`, the `regr_*` family, and so on). There a string can only mean a column, so they accept `Expr | str` via `_to_raw_expr()`. Their literal arguments (for example `string_agg`'s `delimiter` or `nth_value`'s `n`) are unaffected.
342+
341343
## Implementation Steps
342344

343345
For each function being updated:

0 commit comments

Comments
 (0)