Message Boards Message Boards

0
|
8896 Views
|
7 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Datset output limited?

Posted 11 years ago

Hello,

I have a question concerning the Mathematica 10 "Dataset": When I create a table with e.g. 20 rows

dataset = Dataset[Table[<|"a" -> RandomReal[], "b" -> RandomReal[], "c" -> RandomReal[]|>, {i, 1, 20}]]

only the first 16 rows will be diplayed. Is it possible to define the number of displayed rows? That means, in this case all 20 rows? Also

dataset[1;;20]

does not help.

Many thanks, Gordon

POSTED BY: gordon-fischer
7 Replies
Posted 11 years ago

Hello Douglas,

thanks for answer! A very good solution!

Cheers, Gordon

POSTED BY: gordon-fischer
Posted 11 years ago
Posted 11 years ago

Hi,

sorry for the late feedback. I have tried some of the suggestions:

For the solution in: http://mathematica.stackexchange.com/questions/54607/mathematica-10-dataset-doesnt-format-more-than-4-columns

it seems so to be that I cannot use "Assoc"(?) e.g. in hasRowKeys = MatchQ[type, HoldPattern[Assoc[Atom, ] | Struct]]; do I have to load an additional library?

Thanks! Gordon

POSTED BY: gordon-fischer

I posted a formatting function in the StackExchange thread. You may be able to use it as a temporary workaround.

POSTED BY: Szabolcs Horvát
Posted 11 years ago

Hallo David and Pieter,

Thanks for answer! I will try it next Week.

Cheers Gordon

POSTED BY: gordon-fischer

Some useful information here:

http://mathematica.stackexchange.com/questions/54607/mathematica-10-dataset-doesnt-format-more-than-4-columns

Taliesin Beynon, one of the commenters/responders in that thread is the lead developer on much of the new functionality surrounding Dataset, associations, and related things in Mathematica 10.

I think that, with regard to the default output formatting of Dataset, Taliesin is saying that it is not currently user-adjustable but that it will evolve in the future. I looked for system settings that determine this (similar to ones that determine how output formats are truncated for large expressions, for example) and did not immediately find any.

As Pieter suggests, for Datasets that involve strictly rectangular data, one could create a custom visualization of what's in the dataset starting with something fo the form

Grid[Normal[Normal[dataset]] /. {(_ -> z_) :> z}]

and building on this to tweak the appearance and, for example, to specify how many rows & columns to show by default.

POSTED BY: David Reiss

Hello Gordon, I have the same issue. To resolve it I switch back from the dataset to the association using //Normal and //TableForm if necessary. There must be a more elegant way. regards, Pieter

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