Skip to main content
Added Mr.Wizard's suggestion
Source Link
Simplex
  • 1.1k
  • 7
  • 13

If I haven't misunderstood the question, hereHere is another relatively straightforward approach:

 data[All, <|#, "LOCATION" -> If[#PLATFORM == "Dropbox", foo[#LOCATION], #LOCATION]|> &]

Does this do what you want?Or using Mr.Wizard's suggestion:

data[All, <|#, "LOCATION" -> If[#PLATFORM == "Dropbox", foo, # &][#LOCATION]|> &]

If I haven't misunderstood the question, here is another relatively straightforward approach:

 data[All, <|#, "LOCATION" -> If[#PLATFORM == "Dropbox", foo[#LOCATION], #LOCATION]|> &]

Does this do what you want?

Here is another relatively straightforward approach:

 data[All, <|#, "LOCATION" -> If[#PLATFORM == "Dropbox", foo[#LOCATION], #LOCATION]|> &]

Or using Mr.Wizard's suggestion:

data[All, <|#, "LOCATION" -> If[#PLATFORM == "Dropbox", foo, # &][#LOCATION]|> &]
deleted 58 characters in body
Source Link
Simplex
  • 1.1k
  • 7
  • 13

If I haven't misunderstood the question, here is another relatively straightforward approach:

 data[All, Append[#<|#, "LOCATION" -> If[#PLATFORM == "Dropbox", foo[#LOCATION], #LOCATION]]#LOCATION]|> &]

It can potentially reorder the columns, although perhaps that's not an issueDoes this do what you want?

If I haven't misunderstood the question, here is another relatively straightforward approach:

data[All, Append[#, "LOCATION" -> If[#PLATFORM == "Dropbox", foo[#LOCATION], #LOCATION]] &]

It can potentially reorder the columns, although perhaps that's not an issue?

If I haven't misunderstood the question, here is another relatively straightforward approach:

 data[All, <|#, "LOCATION" -> If[#PLATFORM == "Dropbox", foo[#LOCATION], #LOCATION]|> &]

Does this do what you want?

Source Link
Simplex
  • 1.1k
  • 7
  • 13

If I haven't misunderstood the question, here is another relatively straightforward approach:

data[All, Append[#, "LOCATION" -> If[#PLATFORM == "Dropbox", foo[#LOCATION], #LOCATION]] &]

It can potentially reorder the columns, although perhaps that's not an issue?