Pluto: how to change column names of a data frame?

Hi all,

I have a simple data frame that is working Ok inside Pluto. I have to change the names of the column headers because they are too long.

The usual procedure is to use the function rename! but this does not work with Pluto. Is there any way around this problem? I guess that the error is due to the reactivity properties. Thanks

MWE:

rename!(OECD,[:AUS, :AUT, :BEL, :CAN, :DNK, :FIN, :FRA, :DEU, :GRC, :IRL, :ITA, :JPN, :KOR, :NLD, :NZL, :NOR, :PRT, :ESP, :SWE, :CHE, :GBR , :USA])

Pluto throws out:

UndefVarError: rename! not defined

1 Like

rename! seems to be working correctly in Pluto.

It might be that you have multiple packages exporting rename!?

Try using DataFrames.rename! and if the multiple export is the issue it should solve it

1 Like

Yep, you are right. Both DataFrames and TimeSeries export “rename!”. Thanks a lot.