Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.9K Views
|
3 Replies
|
1 Total Like
View groups...
Share
Share this post:

Mapping AssociateTo to a list of association fails

POSTED BY: George Clapp
3 Replies
POSTED BY: Carl Verdon
POSTED BY: George Clapp
Posted 2 years ago

Hi George,

Using a Dataset

titanic = ExampleData[{"Dataset", "Titanic"}]

ClearAll@doubleAge;
doubleAge[age_?NumericQ] := age * 2;

titanic[All, <|#, "age" -> doubleAge[#age]|> &]

You can replace doubleAge with any function and replace age with any column name.

POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard