Hello hello, is there an easier/cheaper way to ren...
# general
n
Hello hello, is there an easier/cheaper way to rename a column besides
df.with_column(output_column, daft.col(input_column)).exclude(input_column)
? I can't use the
alias()
syntax since it only applies to expressions.
d
Does
df.select(col('input_col').alias('output_col'))
work for you?
Oh, and selecting the other columns you need too
👍 1
n
This will only return a single column - I'm looking for the entire
df
with
n
renamed columns (or just one renamed column is okay to start)
d
Yeah seems like we have to add a more ergonomic way. What you posted should be "cheap" in terms of compute (it'll basically add an alias at the end of the day)
❤️ 1
n
Cool - just wanted to make sure it's the most efficient way. I'm hiding this behind a df-in df-out
transform
which can be applied using
daft.DataFrame.transform()
for now which improves the ergonomics a bit
🚀 1