How to return a new table after modifying the columns, instead of changing the original table?

20 Views Asked by At

How to return a new table without changing the original one when I use tmpTB.replaceColumn!(args)? Is there a parameter like inplace=False in pandas?

1

There are 1 best solutions below

0
jinwandalaohu On

In DolphinDB, all the functions with "!" will change the original object. The only function to replace columns is the replaceColumn! function. You can assign the original table to a new table variable before modifying it. Or you can use the copy function as follows:

tmpTB.copy().replaceColumn!(args)