Skip to content
Discussion options

You must be logged in to vote

Yes, you can either use an assignment statement, or the update() function:

DT["newcol"] = <expression> # or
DT[:, update(newcol=<expression>)]

where <expression> is any formula involving other columns. For example:

DT[:, update(Revenue = f.Quantity * f.Price)]

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@santoshbs
Comment options

@st-pasha
Comment options

Answer selected by st-pasha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants