milenkovicm commented on PR #1276:
URL:
https://github.com/apache/datafusion-python/pull/1276#issuecomment-3403323740
> FWIW I did a quick test with this:
>
> ```diff
> --- a/python/datafusion/dataframe.py
> +++ b/python/datafusion/dataframe.py
> @@ -424,7 +424,9 @@ class DataFrame:
> df = df.select("a", col("b"), col("a").alias("alternate_a"))
>
> """
> - exprs_internal = expr_list_to_raw_expr_list(exprs)
> + expr_list = [self.parse_sql_expr(e) if isinstance(e, str) else e
for e in exprs]
> +
> + exprs_internal = expr_list_to_raw_expr_list(expr_list)
> return DataFrame(self.df.select(*exprs_internal))
> ```
>
> With that you can do `df.select("a-b")`. It feels very intuitive to me.
should we roll back df.select_expr and do this instead @timsaucer , it makes
sense to me to do it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]