Group Abstract Group Abstract

Message Boards Message Boards

3
|
12.7K Views
|
4 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Apply the same function to multiple columns in Dataset using Merge

POSTED BY: Seth Chandler
4 Replies

You may also use the operator form of Merge which compacts the Dataset query a bit.

myds[Merge[Min], 
 {"Reinsurance Payment Amount (or Not Eligible)", "Individual Market Risk Adjustment Transfer Amount"}]

Hope this helps.

POSTED BY: Edmund Robinson
POSTED BY: Aeyoss Antelope

Also, this seems to work:

myds[Min, #] & /@ {"Reinsurance Payment Amount (or Not Eligible)", 
  "Individual Market Risk Adjustment Transfer Amount"}

By this I mean that it gives the minimum of the 2 columns specified, equivalently

Map[myds[Min, #] &, {"Reinsurance Payment Amount (or Not Eligible)", 
  "Individual Market Risk Adjustment Transfer Amount"}]

HTH.

POSTED BY: Aeyoss Antelope
Posted 9 years ago

A more compact construct as given by in the documentation of Dataset is:

myds[Total, {"Reinsurance Payment Amount (or Not Eligible)", 
  "Individual Market Risk Adjustment Transfer Amount", 
  "Small Group Risk Adjustment Transfer Amount"}]
POSTED BY: Michael Helmle
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard