Message Boards Message Boards

0
|
2629 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Logic problem with Dataset Selection

Posted 3 years ago

I wish to select data from a Dataset. The criteria is the Head of some functions. It's working fine when I formulate the selection with equality (==). When I use unequal (!=) I get an empty list where I expect some data. I did a check with a selection on an other column with characters and this works in all cases. See NB. Can someone help me on this please?

POSTED BY: Chris Van Damme
2 Replies
Posted 3 years ago

Hi Chris,

Use SameQ (===)

dataset[Select[Head[#e] === f &], {"a", "e"}]
dataset[Select[Not[Head[#e] === f] &], {"a", "e"}]
POSTED BY: Rohit Namjoshi

Thanks Rohit. Subtil interpretations.

dataset[Select[Head[#e] =!= f &], {"a", "e"}]
POSTED BY: Chris Van Damme
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract