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.
'mecium
==========
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?
Cheers!
GroupBy
operation is actually correct. The messagedata::shdw
is a known V10.2 bug discussed in (88393). See that question for a work-around. Voting to close as a duplicate. $\endgroup$Dataset
is not "destroyed":Normal@GroupBy[data, First]
gives the expected<|1 -> {{1, 2}, {1, 3}}, 2 -> {{2, 2}}|>
. Also, it is still accessible viaGlobal`data
, even if it is less convenient. $\endgroup$