DataFrame icon indicating copy to clipboard operation
DataFrame copied to clipboard

Weird behaviour when performing sorted: on a DataFrame

Open myroslavarm opened this issue 5 years ago • 0 comments

There seems to be a problem in DataFrame with using sorted: on it. I have read from a file using a Dataframe readFromCsv: method, where the file has two columns: key and value. At that point everything seems ok, and in Pharo I get a DataFrame with two columns. However, after performing value-based sorting like this:

data sorted: [ :a :b | (a at: 'value') > (b at: 'value') ]

as a result I get an Array, each element of which is a DataSeries mapping of (key->some_key value->some_value) which seems really weird and is undesirable.

I'm attaching a screenshot to better show the problem:

image

Even if this is not a bug, this still seems like an overly complicated representation of the data.

myroslavarm avatar Feb 10 '20 16:02 myroslavarm