Suppose we wish to replace the cols "b" and "c" of rows 3 to 5 in the following dataset to b and c respectively:
dataset = Dataset[{
<|"a" -> 1, "b" -> "x", "c" -> {1}|>,
<|"a" -> 2, "b" -> "y", "c" -> {2, 3}|>,
<|"a" -> 3, "b" -> "z", "c" -> {3}|>,
<|"a" -> 4, "b" -> "x", "c" -> {4, 5}|>,
<|"a" -> 5, "b" -> "y", "c" -> {5, 6, 7}|>,
<|"a" -> 6, "b" -> "z", "c" -> {}|>}]
- What is the most efficient way to do it at scale, i.e. assuming the replacements are going to be across multiple/ all rows in large datasets.
- Is is possible to do it inline, i.e., in the current dataset, without having to recreate a new dataset?
- It would be preferrable if the updates are computed (i.e., not constants as shown in this toy example)