Message Boards Message Boards


Dataset and JoinAcross -- Expected Behaviour?

Posted 9 years ago
1 Reply
0 Total Likes

I've scraped some data on London's Underground system from various sources on the web, and am trying to combine it into one dataset.

Schematically, this is what I am trying to do:

ds1 = Dataset[{<| "A" -> 1, "B" -> 2 |>, <| "A" -> 3, "B" -> 4 |>, <| "A" -> 5, "B" -> 6 |>}];
ds2 = Dataset[{<| "A" -> 1, "C" -> 20 |>, <| "A" -> 3, "C" -> 40 |>}];
JoinAcross[ds1, ds2, {"A", "A"}]

And this is the Mathematica output from the above, which is as I would expect it to be:

enter image description here

However, when I attempt what is effectively the same thing with my real data, it doesn't work. For example, my two data sets are...

enter image description here

But when I try to combine them, thus...

JoinAcross[csvStations, htmlStations, {"Station", "Station"}]

I get the following result:

enter image description here

Is this a bug, or am I doing something wrong?

POSTED BY: Brad Varey
Posted 9 years ago

Sorry, I have just realised I have been really dumb, and the last result is simply how Mathematica displays a Dataset when the column labels need to wrap.

Apologies to all for wasting your time.

POSTED BY: Brad Varey
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract