Update: With thanks to the editor, it was made clear to me that this is due to a bug in some packages autoloaded during some operations on Dataset expressions. Nothing to do with the name of the Dataset per se.



1) Define a dataset named "data"

data = Dataset[{{1,2}, {1,3}, {2,2}}]

2) Now apply a GroupBy (or GatherBy, or SortBy) operation on it:

GroupBy[data, First]

3) Be puzzled by this response or laugh at my rampant stupidity...

>> data::shdw : Symbol data appears in multiple contexts {Streaming`LazyList`Testing`, Global`}; definitions in context Streaming`LazyList`Testing` may shadow or be shadowed by other definitions...

4) Be twice puzzled: all 3 operations work fine if the dataset has a different name (i.e. other than "data").

I am seeing this in MMA 10.2 on OSX 10.10.4 Can anyone replicate this behavior, or suggest a workaround?

RTMF'ing failed. This breaks code that I do not want to rewrite.

Paranoid addendum: should I avoid using "data" as a symbol name?


  • 2
    $\begingroup$ geeeeeeeeeeeez! $\endgroup$ Aug 10, 2015 at 14:23
  • 3
    $\begingroup$ The result of the GroupBy operation is actually correct. The message data::shdw is a known V10.2 bug discussed in (88393). See that question for a work-around. Voting to close as a duplicate. $\endgroup$
    – WReach
    Aug 10, 2015 at 14:26
  • 1
    $\begingroup$ While the message is "interesting" and clearly a duplicate, it should be noted that your Dataset is not "destroyed": Normal@GroupBy[data, First] gives the expected <|1 -> {{1, 2}, {1, 3}}, 2 -> {{2, 2}}|>. Also, it is still accessible via Global`data, even if it is less convenient. $\endgroup$
    – rcollyer
    Aug 10, 2015 at 14:41
  • $\begingroup$ Thank you all for the comments. I will mark the question closed as a duplicate. After reading the referenced discussion (88393), I am not knowledgeable enough to understand if using another symbol for my dataset (i.e. not "data") avoids the problem or simply hides it from view. @rcollyer: thank you for the correction. I see that the wording of the title is poorly chosen, and may lead others to misinterpret the bug. $\endgroup$
    – paramecium
    Aug 10, 2015 at 16:48


Browse other questions tagged or ask your own question.