简体   繁体   中英

How to rename multiple columns in vaex dataframe -Python

I am having trouble renaming multiple columns in vaex dataframe.

I tried

new_name= 'col2'

old_name='col1'

vaex_data.rename(old_name, new_name)

but this approach only works for one column at a time.

Is there something like in pandas where we can pass a dictionary to rename multiple columns?

I didn't find anything in docs. Is there any trick to achieve this.

df.rename(columns={'col': 'col1'}, inplace=True)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM