I don's sure this is a bug or not.Suppose I have a dataset
dataset =
Dataset[{{"a", 10}, {"b", 11}, {"c", 12}, {"d", 5}, {"e", 99}}]
Then we do two same operation on it.
{set1 = dataset[All, <|"col1" -> 1, "col2" -> 2|>],
set2 = dataset[Map[AssociationThread[{"col1", "col2"} -> #] &]]}
As we see,we get two data set totally.But in some time,we can not judge it just by our eyes.Let use ==
or ===
to test it.
set1 == set2
set1 === set2
False
Of course Equal @@ Normal /@ {set1, set2}
works well,but the Normal
don't judge two Dataset
instead of two List
actually.So I have two question here:
- Why the
==
and===
will fail here? - Is there any method can judge two datasets are same or not?
FullForm@set1
andFullForm@set2
. You seem to have answered part 2 yourself. $\endgroup$