You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
expr.name.map takes a function (str) -> str. This means if the user has a function that takes a string Expr and returns a new one, they can't use it with expr.name.map. For instance, one might have
As far as I can tell, this can only be used on column values, not column names. If you wanted to do expr.name.map(to_canonical_ident) you'd have to instead reimplement the function in “plain” python.
It would be nice if there were an expr.name.map_expr which would pass in lit(name) and pull the result out of the resulting Expr. I am currently working around this as follows, but it's a lot of ceremony:
Description
expr.name.map
takes a function(str) -> str
. This means if the user has a function that takes a stringExpr
and returns a new one, they can't use it withexpr.name.map
. For instance, one might haveAs far as I can tell, this can only be used on column values, not column names. If you wanted to do
expr.name.map(to_canonical_ident)
you'd have to instead reimplement the function in “plain” python.It would be nice if there were an
expr.name.map_expr
which would pass inlit(name)
and pull the result out of the resultingExpr
. I am currently working around this as follows, but it's a lot of ceremony:The text was updated successfully, but these errors were encountered: